From 150d43298afc33b253f71b2b852f32199e0c4bb8 Mon Sep 17 00:00:00 2001 From: Binh Tran Date: Fri, 11 Nov 2022 14:14:02 -0600 Subject: [PATCH 001/277] AC-6897 template caching improvements --- lib/internal/Magento/Framework/View/Element/AbstractBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 499e374c47906..5c088e0242557 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -172,7 +172,7 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl /** * @var DeploymentConfig */ - protected $deploymentConfig; + private $deploymentConfig; /** * @var LockGuardedCacheLoader From 15a05f8c7e4eb5f439545b1c4d6a8b82f2780024 Mon Sep 17 00:00:00 2001 From: Binh Tran Date: Fri, 11 Nov 2022 17:10:55 -0600 Subject: [PATCH 002/277] AC-6897 template caching improvements --- app/code/Magento/Email/Model/Template/Filter.php | 10 ++++++++++ .../Magento/Framework/View/Element/AbstractBlock.php | 2 +- .../View/Test/Unit/Element/AbstractBlockTest.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 40320b9ffc845..71f8d1b693223 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -78,6 +78,11 @@ class Filter extends Template */ protected $_modifiers = ['nl2br' => '']; + /** + * @var string + */ + private const CACHE_KEY_PREFIX = "EMAIL_FILTER_"; + /** * @var bool */ @@ -404,6 +409,11 @@ public function blockDirective($construction) { $skipParams = ['class', 'id', 'output']; $blockParameters = $this->getParameters($construction[2]); + + if ($blockParameters['cache_key']) { + $blockParameters['cache_key'] = self::CACHE_KEY_PREFIX . $blockParameters['cache_key']; + } + $block = null; if (isset($blockParameters['class'])) { diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 5c088e0242557..ae8f48a03d1a7 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -1052,7 +1052,7 @@ public function getCacheKey() $key[] = (string)$this->deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY); $key = implode('|', $key); - $key = sha1($key); // use hashing to hide potentially private data + $key = hash('sha256', $key); // use hashing to hide potentially private data return static::CACHE_KEY_PREFIX . $key; } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php index 1af3fbcdc4235..362aab83854e9 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php @@ -246,7 +246,7 @@ public function testGetCacheKeyByName() $nameInLayout = 'testBlock'; $this->block->setNameInLayout($nameInLayout); $encryptionKey = $this->deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY); - $cacheKey = sha1($nameInLayout . '|' . $encryptionKey); + $cacheKey = hash('sha256', $nameInLayout . '|' . $encryptionKey); $this->assertEquals(AbstractBlock::CACHE_KEY_PREFIX . $cacheKey, $this->block->getCacheKey()); } From 408c514c2ef161948d1f47b0f47af7d737f3e776 Mon Sep 17 00:00:00 2001 From: Binh Tran Date: Fri, 11 Nov 2022 17:12:09 -0600 Subject: [PATCH 003/277] AC-6897 template caching improvements --- app/code/Magento/Email/Model/Template/Filter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 71f8d1b693223..6d65fa65bbe45 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -410,7 +410,7 @@ public function blockDirective($construction) $skipParams = ['class', 'id', 'output']; $blockParameters = $this->getParameters($construction[2]); - if ($blockParameters['cache_key']) { + if (isset($blockParameters['cache_key'])) { $blockParameters['cache_key'] = self::CACHE_KEY_PREFIX . $blockParameters['cache_key']; } From c62f49d1d008b963da66b653f1a3a04113aaf9a9 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Sat, 26 Nov 2022 00:30:03 +0530 Subject: [PATCH 004/277] AC-6958: admin product import improvements --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index ec7085acba4ec..0d1ff209cdb4d 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -1631,6 +1631,9 @@ protected function _saveProducts() $bunch[$rowNum][self::URL_KEY] = $rowData[self::URL_KEY] = $urlKey; } + // remove null byte character + $rowData[self::COL_NAME] = preg_replace('/[\x00-\x1F\x7F]/', '', $rowData[self::COL_NAME]); + $rowSku = $rowData[self::COL_SKU]; $rowSkuNormalized = mb_strtolower($rowSku); From 5eb0fd4d867fbf7359b92eb34757e440fbee6438 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Wed, 30 Nov 2022 13:52:41 +0530 Subject: [PATCH 005/277] AC-6958: admin product import improvements --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 0d1ff209cdb4d..0244391a834e6 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -47,6 +47,7 @@ */ class Product extends AbstractEntity { + private const COL_NAME_FORMAT = '/[\x00-\x1F\x7F]/'; private const DEFAULT_GLOBAL_MULTIPLE_VALUE_SEPARATOR = ','; public const CONFIG_KEY_PRODUCT_TYPES = 'global/importexport/import_product_types'; private const HASH_ALGORITHM = 'sha256'; @@ -1632,7 +1633,7 @@ protected function _saveProducts() } // remove null byte character - $rowData[self::COL_NAME] = preg_replace('/[\x00-\x1F\x7F]/', '', $rowData[self::COL_NAME]); + $rowData[self::COL_NAME] = preg_replace(self::COL_NAME_FORMAT, '', $rowData[self::COL_NAME]); $rowSku = $rowData[self::COL_SKU]; $rowSkuNormalized = mb_strtolower($rowSku); From c2c04ab178f63d49d85481bd92bba01d043c00a0 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Tue, 6 Dec 2022 21:35:39 +0530 Subject: [PATCH 006/277] AC-6958: admin product import improvements --- .../Magento/CatalogImportExport/Model/Import/Product.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 0244391a834e6..07ca899fec0d8 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -1632,8 +1632,10 @@ protected function _saveProducts() $bunch[$rowNum][self::URL_KEY] = $rowData[self::URL_KEY] = $urlKey; } - // remove null byte character - $rowData[self::COL_NAME] = preg_replace(self::COL_NAME_FORMAT, '', $rowData[self::COL_NAME]); + if (!empty($rowData[self::COL_NAME])) { + // remove null byte character + $rowData[self::COL_NAME] = preg_replace(self::COL_NAME_FORMAT, '', $rowData[self::COL_NAME]); + } $rowSku = $rowData[self::COL_SKU]; $rowSkuNormalized = mb_strtolower($rowSku); From 86fe531d9aa011e5813217ab9b731f18aa80742e Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 8 Dec 2022 17:09:40 +0530 Subject: [PATCH 007/277] AC-7058: Guest Checkout REST API Fix --- .../Model/ShippingInformationManagement.php | 34 +++++--- .../Quote/Model/QuoteAddressValidator.php | 87 ++++++++++++------- 2 files changed, 78 insertions(+), 43 deletions(-) diff --git a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php index f397a8ddc9cf1..f08c48c55efa1 100644 --- a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Checkout\Model; @@ -39,60 +40,62 @@ class ShippingInformationManagement implements ShippingInformationManagementInte /** * @var PaymentMethodManagementInterface */ - protected $paymentMethodManagement; + protected PaymentMethodManagementInterface $paymentMethodManagement; /** * @var PaymentDetailsFactory */ - protected $paymentDetailsFactory; + protected PaymentDetailsFactory $paymentDetailsFactory; /** * @var CartTotalRepositoryInterface */ - protected $cartTotalsRepository; + protected CartTotalRepositoryInterface $cartTotalsRepository; /** * @var CartRepositoryInterface */ - protected $quoteRepository; - + protected CartRepositoryInterface $quoteRepository; /** * @var Logger */ - protected $logger; + protected Logger $logger; /** * @var QuoteAddressValidator */ - protected $addressValidator; + protected QuoteAddressValidator $addressValidator; /** * @var AddressRepositoryInterface * @deprecated 100.2.0 + * @see AddressRepositoryInterface */ - protected $addressRepository; + protected AddressRepositoryInterface $addressRepository; /** * @var ScopeConfigInterface * @deprecated 100.2.0 + * @see ScopeConfigInterface */ - protected $scopeConfig; + protected ScopeConfigInterface $scopeConfig; /** * @var TotalsCollector * @deprecated 100.2.0 + * @see TotalsCollector */ - protected $totalsCollector; + protected TotalsCollector $totalsCollector; /** * @var CartExtensionFactory */ - private $cartExtensionFactory; + private CartExtensionFactory $cartExtensionFactory; /** * @var ShippingAssignmentFactory */ - protected $shippingAssignmentFactory; + protected ShippingAssignmentFactory $shippingAssignmentFactory; /** * @var ShippingFactory @@ -262,8 +265,11 @@ protected function validateQuote(Quote $quote): void * @param string $method * @return CartInterface */ - private function prepareShippingAssignment(CartInterface $quote, AddressInterface $address, $method): CartInterface - { + private function prepareShippingAssignment( + CartInterface $quote, + AddressInterface $address, + string $method + ): CartInterface { $cartExtension = $quote->getExtensionAttributes(); if ($cartExtension === null) { $cartExtension = $this->cartExtensionFactory->create(); diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index f0bc12f7b3a36..7940686eb1fe0 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -3,8 +3,15 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Quote\Model; +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\Session; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Api\Data\AddressInterface; use Magento\Quote\Api\Data\CartInterface; @@ -17,35 +24,33 @@ class QuoteAddressValidator { /** - * Address factory. - * - * @var \Magento\Customer\Api\AddressRepositoryInterface + * @var AddressRepositoryInterface */ - protected $addressRepository; + protected AddressRepositoryInterface $addressRepository; /** - * Customer repository. - * - * @var \Magento\Customer\Api\CustomerRepositoryInterface + * @var CustomerRepositoryInterface */ - protected $customerRepository; + protected CustomerRepositoryInterface $customerRepository; /** + * @var Session * @deprecated 101.1.1 This class is not a part of HTML presentation layer and should not use sessions. + * @see Session */ - protected $customerSession; + protected Session $customerSession; /** * Constructs a quote shipping address validator service object. * - * @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository - * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository Customer repository. - * @param \Magento\Customer\Model\Session $customerSession + * @param AddressRepositoryInterface $addressRepository + * @param CustomerRepositoryInterface $customerRepository Customer repository. + * @param Session $customerSession */ public function __construct( - \Magento\Customer\Api\AddressRepositoryInterface $addressRepository, - \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, - \Magento\Customer\Model\Session $customerSession + AddressRepositoryInterface $addressRepository, + CustomerRepositoryInterface $customerRepository, + Session $customerSession ) { $this->addressRepository = $addressRepository; $this->customerRepository = $customerRepository; @@ -56,10 +61,10 @@ public function __construct( * Validate address. * * @param AddressInterface $address - * @param int|null $customerId Cart belongs to + * @param int|null $customerId * @return void - * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. + * @throws LocalizedException The specified customer ID or address ID is not valid. + * @throws NoSuchEntityException The specified customer ID or address ID is not valid. */ private function doValidate(AddressInterface $address, ?int $customerId): void { @@ -67,7 +72,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void if ($customerId) { $customer = $this->customerRepository->getById($customerId); if (!$customer->getId()) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid customer id %1', $customerId) ); } @@ -76,7 +81,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void if ($address->getCustomerAddressId()) { //Existing address cannot belong to a guest if (!$customerId) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid customer address id %1', $address->getCustomerAddressId()) ); } @@ -84,7 +89,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void try { $this->addressRepository->getById($address->getCustomerAddressId()); } catch (NoSuchEntityException $e) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid address id %1', $address->getId()) ); } @@ -94,7 +99,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void return $address->getId(); }, $this->customerRepository->getById($customerId)->getAddresses()); if (!in_array($address->getCustomerAddressId(), $applicableAddressIds)) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid customer address id %1', $address->getCustomerAddressId()) ); } @@ -104,29 +109,53 @@ private function doValidate(AddressInterface $address, ?int $customerId): void /** * Validates the fields in a specified address data object. * - * @param \Magento\Quote\Api\Data\AddressInterface $addressData The address data object. + * @param AddressInterface $addressData The address data object. * @return bool - * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. + * @throws InputException The specified address belongs to another customer. + * @throws NoSuchEntityException|LocalizedException The specified customer ID or address ID is not valid. */ - public function validate(AddressInterface $addressData) + public function validate(AddressInterface $addressData): bool { $this->doValidate($addressData, $addressData->getCustomerId()); return true; } + /** + * Validate Quest Address for guest user + * + * @param AddressInterface $address + * @param CartInterface $cart + * @return void + * @throws NoSuchEntityException + */ + private function doValidateForGuestQuoteAddress(AddressInterface $address, CartInterface $cart): void + { + //validate guest cart address + if ($address->getId() !== null) { + $old = $cart->getAddressesCollection()->getItemById($address->getId()); + if ($old === null) { + throw new NoSuchEntityException( + __('Invalid quote address id %1', $address->getId()) + ); + } + } + } + /** * Validate address to be used for cart. * * @param CartInterface $cart * @param AddressInterface $address * @return void - * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. + * @throws InputException The specified address belongs to another customer. + * @throws NoSuchEntityException|LocalizedException The specified customer ID or address ID is not valid. */ public function validateForCart(CartInterface $cart, AddressInterface $address): void { - $this->doValidate($address, $cart->getCustomerIsGuest() ? null : $cart->getCustomer()->getId()); + if ($cart->getCustomerIsGuest()) { + $this->doValidateForGuestQuoteAddress($address, $cart); + } + $this->doValidate($address, $cart->getCustomerIsGuest() ? null : (int) $cart->getCustomer()->getId()); } } From 91d5fc560edb96369f06619fd45696f00339f0bc Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 8 Dec 2022 23:12:55 +0530 Subject: [PATCH 008/277] AC-7058: Guest Checkout REST API Fix --- app/code/Magento/Quote/i18n/en_US.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/i18n/en_US.csv b/app/code/Magento/Quote/i18n/en_US.csv index d96c88b7795f7..c8da332f729c8 100644 --- a/app/code/Magento/Quote/i18n/en_US.csv +++ b/app/code/Magento/Quote/i18n/en_US.csv @@ -69,3 +69,4 @@ Carts,Carts "Validated Country Code","Validated Country Code" "Validated Vat Number","Validated Vat Number" "Invalid Quote Item id %1","Invalid Quote Item id %1" +"Invalid quote address id %1","Invalid quote address id %1" From 275783d3d75edb8c88fbcde577397959acd15cca Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Mon, 12 Dec 2022 14:58:06 +0530 Subject: [PATCH 009/277] AC-6695: Guest Checkout Fix --- .../Magento/Checkout/etc/adminhtml/system.xml | 4 + .../Api/AccountManagementInterface.php | 131 +++---- .../Customer/Model/AccountManagement.php | 333 ++++++++++++------ 3 files changed, 296 insertions(+), 172 deletions(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index b56566a043c3e..10c885d8c0dd4 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -13,6 +13,10 @@ Magento_Checkout::checkout + + + Magento\Config\Model\Config\Source\Yesno + Magento\Config\Model\Config\Source\Yesno diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index 9c607be9f217c..164dfa2ba1714 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -7,7 +7,14 @@ namespace Magento\Customer\Api; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Api\Data\ValidationResultsInterface; use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\State\ExpiredException; +use Magento\Framework\Exception\State\InputMismatchException; /** * Interface for managing customers accounts. @@ -28,11 +35,11 @@ interface AccountManagementInterface /** * Create customer account. Perform necessary business operations like sending email. * - * @param \Magento\Customer\Api\Data\CustomerInterface $customer - * @param string $password + * @param CustomerInterface $customer + * @param string|null $password * @param string $redirectUrl - * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @return CustomerInterface + * @throws LocalizedException */ public function createAccount( \Magento\Customer\Api\Data\CustomerInterface $customer, @@ -43,69 +50,69 @@ public function createAccount( /** * Create customer account using provided hashed password. Should not be exposed as a webapi. * - * @param \Magento\Customer\Api\Data\CustomerInterface $customer + * @param CustomerInterface $customer * @param string $hash Password hash that we can save directly * @param string $redirectUrl URL fed to welcome email templates. Can be used by templates to, for example, direct * the customer to a product they were looking at after pressing confirmation link. - * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\InputException If bad input is provided - * @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used - * @throws \Magento\Framework\Exception\LocalizedException + * @return CustomerInterface + * @throws InputException If bad input is provided + * @throws InputMismatchException If the provided email is already used + * @throws LocalizedException */ public function createAccountWithPasswordHash( - \Magento\Customer\Api\Data\CustomerInterface $customer, - $hash, - $redirectUrl = '' - ); + CustomerInterface $customer, + string $hash, + string $redirectUrl = '' + ): CustomerInterface; /** * Validate customer data. * - * @param \Magento\Customer\Api\Data\CustomerInterface $customer - * @return \Magento\Customer\Api\Data\ValidationResultsInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @param CustomerInterface $customer + * @return ValidationResultsInterface + * @throws LocalizedException */ - public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer); + public function validate(CustomerInterface $customer): ValidationResultsInterface; /** * Check if customer can be deleted. * * @param int $customerId * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found - * @throws \Magento\Framework\Exception\LocalizedException + * @throws NoSuchEntityException If group is not found + * @throws LocalizedException */ - public function isReadonly($customerId); + public function isReadonly(int $customerId): bool; /** * Activate a customer account using a key that was sent in a confirmation email. * * @param string $email * @param string $confirmationKey - * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @return CustomerInterface + * @throws LocalizedException */ - public function activate($email, $confirmationKey); + public function activate(string $email, string $confirmationKey): CustomerInterface; /** * Activate a customer account using a key that was sent in a confirmation email. * * @param int $customerId * @param string $confirmationKey - * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @return CustomerInterface + * @throws LocalizedException */ - public function activateById($customerId, $confirmationKey); + public function activateById(int $customerId, string $confirmationKey): CustomerInterface; /** * Authenticate a customer by username and password * * @param string $email * @param string $password - * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @return CustomerInterface + * @throws LocalizedException */ - public function authenticate($email, $password); + public function authenticate(string $email, string $password): CustomerInterface; /** * Change customer password. @@ -114,9 +121,9 @@ public function authenticate($email, $password); * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function changePassword($email, $currentPassword, $newPassword); + public function changePassword(string $email, string $currentPassword, string $newPassword): bool; /** * Change customer password. @@ -125,20 +132,20 @@ public function changePassword($email, $currentPassword, $newPassword); * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function changePasswordById($customerId, $currentPassword, $newPassword); + public function changePasswordById(int $customerId, string $currentPassword, string $newPassword): bool; /** * Send an email to the customer with a password reset link. * * @param string $email * @param string $template - * @param int $websiteId + * @param int|null $websiteId * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function initiatePasswordReset($email, $template, $websiteId = null); + public function initiatePasswordReset(string $email, string $template, int $websiteId = null): bool; /** * Reset customer password. @@ -149,10 +156,10 @@ public function initiatePasswordReset($email, $template, $websiteId = null); * @param string $newPassword * * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException * @throws InputException */ - public function resetPassword($email, $resetToken, $newPassword); + public function resetPassword(string $email, string $resetToken, string $newPassword): bool; /** * Check if password reset token is valid. @@ -162,22 +169,22 @@ public function resetPassword($email, $resetToken, $newPassword); * @param string $resetPasswordLinkToken * * @return bool True if the token is valid - * @throws \Magento\Framework\Exception\State\InputMismatchException If token is mismatched - * @throws \Magento\Framework\Exception\State\ExpiredException If token is expired - * @throws \Magento\Framework\Exception\InputException If token or customer id is invalid - * @throws \Magento\Framework\Exception\NoSuchEntityException If customer doesn't exist - * @throws \Magento\Framework\Exception\LocalizedException + * @throws InputMismatchException If token is mismatched + * @throws ExpiredException If token is expired + * @throws InputException If token or customer id is invalid + * @throws NoSuchEntityException If customer doesn't exist + * @throws LocalizedException */ - public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); + public function validateResetPasswordLinkToken(int $customerId, string $resetPasswordLinkToken): bool; /** * Gets the account confirmation status. * * @param int $customerId * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function getConfirmationStatus($customerId); + public function getConfirmationStatus(int $customerId): string; /** * Resend confirmation email. @@ -186,19 +193,19 @@ public function getConfirmationStatus($customerId); * @param int $websiteId * @param string $redirectUrl * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function resendConfirmation($email, $websiteId, $redirectUrl = ''); + public function resendConfirmation(string $email, int $websiteId, string $redirectUrl = ''): bool; /** * Check if given email is associated with a customer account in given website. * * @param string $customerEmail - * @param int $websiteId If not set, will use the current websiteId + * @param int|null $websiteId If not set, will use the current websiteId * @return bool - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function isEmailAvailable($customerEmail, $websiteId = null); + public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool; /** * Check store availability for customer given the customerId. @@ -206,29 +213,29 @@ public function isEmailAvailable($customerEmail, $websiteId = null); * @param int $customerWebsiteId * @param int $storeId * @return bool - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function isCustomerInStore($customerWebsiteId, $storeId); + public function isCustomerInStore(int $customerWebsiteId, int $storeId): bool; /** * Retrieve default billing address for the given customerId. * * @param int $customerId - * @return \Magento\Customer\Api\Data\AddressInterface - * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid - * @throws \Magento\Framework\Exception\LocalizedException + * @return AddressInterface + * @throws NoSuchEntityException If the customer Id is invalid + * @throws LocalizedException */ - public function getDefaultBillingAddress($customerId); + public function getDefaultBillingAddress(int $customerId): Data\AddressInterface; /** * Retrieve default shipping address for the given customerId. * * @param int $customerId - * @return \Magento\Customer\Api\Data\AddressInterface - * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid - * @throws \Magento\Framework\Exception\LocalizedException + * @return AddressInterface + * @throws NoSuchEntityException If the customer Id is invalid + * @throws LocalizedException */ - public function getDefaultShippingAddress($customerId); + public function getDefaultShippingAddress(int $customerId): AddressInterface; /** * Return hashed password, which can be directly saved to database. @@ -236,5 +243,5 @@ public function getDefaultShippingAddress($customerId); * @param string $password * @return string */ - public function getPasswordHash($password); + public function getPasswordHash(string $password): string; } diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 08587deee2a76..ba57c1f530afc 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -7,12 +7,14 @@ namespace Magento\Customer\Model; +use JetBrains\PhpStorm\ArrayShape; use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\CustomerMetadataInterface; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Api\Data\AddressInterface; use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Api\Data\ValidationResultsInterface; use Magento\Customer\Api\Data\ValidationResultsInterfaceFactory; use Magento\Customer\Api\SessionCleanerInterface; use Magento\Customer\Helper\View as CustomerViewHelper; @@ -20,6 +22,7 @@ use Magento\Customer\Model\Customer as CustomerModel; use Magento\Customer\Model\Customer\CredentialsValidator; use Magento\Customer\Model\ForgotPasswordToken\GetCustomerByToken; +use Magento\Customer\Model\Logger as CustomerLogger; use Magento\Customer\Model\Metadata\Validator; use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory; use Magento\Directory\Model\AllowedCountries; @@ -57,7 +60,6 @@ use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; use Psr\Log\LoggerInterface as PsrLogger; -use Magento\Customer\Model\Logger as CustomerLogger; /** * Handle various customer account actions @@ -69,6 +71,8 @@ */ class AccountManagement implements AccountManagementInterface { + private const GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG = 'checkout/options/disable_guest_checkout_login'; + /** * Configuration paths for create account email template * @@ -218,27 +222,27 @@ class AccountManagement implements AccountManagementInterface /** * @var CustomerFactory */ - private $customerFactory; + private CustomerFactory $customerFactory; /** * @var ValidationResultsInterfaceFactory */ - private $validationResultsDataFactory; + private ValidationResultsInterfaceFactory $validationResultsDataFactory; /** * @var ManagerInterface */ - private $eventManager; + private ManagerInterface $eventManager; /** * @var StoreManagerInterface */ - private $storeManager; + private StoreManagerInterface $storeManager; /** * @var Random */ - private $mathRandom; + private Random $mathRandom; /** * @var Validator @@ -248,147 +252,147 @@ class AccountManagement implements AccountManagementInterface /** * @var AddressRepositoryInterface */ - private $addressRepository; + private AddressRepositoryInterface $addressRepository; /** * @var CustomerMetadataInterface */ - private $customerMetadataService; + private CustomerMetadataInterface $customerMetadataService; /** * @var PsrLogger */ - protected $logger; + protected PsrLogger $logger; /** * @var Encryptor */ - private $encryptor; + private Encryptor $encryptor; /** * @var CustomerRegistry */ - private $customerRegistry; + private CustomerRegistry $customerRegistry; /** * @var ConfigShare */ - private $configShare; + private ConfigShare $configShare; /** * @var StringHelper */ - protected $stringHelper; + protected StringHelper $stringHelper; /** * @var CustomerRepositoryInterface */ - private $customerRepository; + private CustomerRepositoryInterface $customerRepository; /** * @var ScopeConfigInterface */ - private $scopeConfig; + private ScopeConfigInterface $scopeConfig; /** * @var TransportBuilder */ - private $transportBuilder; + private TransportBuilder $transportBuilder; /** * @var DataObjectProcessor */ - protected $dataProcessor; + protected DataObjectProcessor $dataProcessor; /** * @var Registry */ - protected $registry; + protected Registry $registry; /** * @var CustomerViewHelper */ - protected $customerViewHelper; + protected CustomerViewHelper $customerViewHelper; /** * @var DateTime */ - protected $dateTime; + protected DateTime $dateTime; /** * @var ObjectFactory */ - protected $objectFactory; + protected ObjectFactory $objectFactory; /** * @var ExtensibleDataObjectConverter */ - protected $extensibleDataObjectConverter; + protected ExtensibleDataObjectConverter $extensibleDataObjectConverter; /** * @var CustomerModel */ - protected $customerModel; + protected Customer $customerModel; /** * @var AuthenticationInterface */ - protected $authentication; + protected AuthenticationInterface $authentication; /** * @var EmailNotificationInterface */ - private $emailNotification; + private EmailNotificationInterface $emailNotification; /** * @var Backend */ - private $eavValidator; + private Backend $eavValidator; /** * @var CredentialsValidator */ - private $credentialsValidator; + private CredentialsValidator $credentialsValidator; /** * @var DateTimeFactory */ - private $dateTimeFactory; + private DateTimeFactory $dateTimeFactory; /** * @var AccountConfirmation */ - private $accountConfirmation; + private AccountConfirmation $accountConfirmation; /** * @var SearchCriteriaBuilder */ - private $searchCriteriaBuilder; + private SearchCriteriaBuilder $searchCriteriaBuilder; /** * @var AddressRegistry */ - private $addressRegistry; + private AddressRegistry $addressRegistry; /** * @var AllowedCountries */ - private $allowedCountriesReader; + private AllowedCountries $allowedCountriesReader; /** * @var GetCustomerByToken */ - private $getByToken; + private GetCustomerByToken $getByToken; /** * @var SessionCleanerInterface */ - private $sessionCleaner; + private SessionCleanerInterface $sessionCleaner; /** * @var AuthorizationInterface */ - private $authorization; + private AuthorizationInterface $authorization; /** * @var CustomerLogger @@ -526,8 +530,16 @@ public function __construct( /** * @inheritdoc + * + * @param string $email + * @param int $websiteId + * @param string $redirectUrl + * @return bool + * @throws InvalidTransitionException + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function resendConfirmation($email, $websiteId = null, $redirectUrl = '') + public function resendConfirmation(string $email, int $websiteId, string $redirectUrl = ''): bool { $customer = $this->customerRepository->get($email, $websiteId); if (!$customer->getConfirmation()) { @@ -553,8 +565,17 @@ public function resendConfirmation($email, $websiteId = null, $redirectUrl = '') /** * @inheritdoc + * + * @param string $email + * @param string $confirmationKey + * @return CustomerInterface + * @throws InputException + * @throws InputMismatchException + * @throws InvalidTransitionException + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function activate($email, $confirmationKey) + public function activate(string $email, string $confirmationKey): CustomerInterface { $customer = $this->customerRepository->get($email); return $this->activateCustomer($customer, $confirmationKey); @@ -562,8 +583,17 @@ public function activate($email, $confirmationKey) /** * @inheritdoc + * + * @param int $customerId + * @param string $confirmationKey + * @return CustomerInterface + * @throws InputException + * @throws InputMismatchException + * @throws InvalidTransitionException + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function activateById($customerId, $confirmationKey) + public function activateById(int $customerId, string $confirmationKey): CustomerInterface { $customer = $this->customerRepository->getById($customerId); return $this->activateCustomer($customer, $confirmationKey); @@ -581,7 +611,7 @@ public function activateById($customerId, $confirmationKey) * @throws LocalizedException * @throws NoSuchEntityException */ - private function activateCustomer($customer, $confirmationKey) + private function activateCustomer(CustomerInterface $customer, string $confirmationKey): CustomerInterface { // check if customer is inactive if (!$customer->getConfirmation()) { @@ -612,11 +642,19 @@ private function activateCustomer($customer, $confirmationKey) /** * @inheritdoc + * + * @param string $email + * @param string $password + * @return CustomerInterface + * @throws EmailNotConfirmedException + * @throws InvalidEmailOrPasswordException + * @throws LocalizedException + * @throws UserLockedException */ - public function authenticate($username, $password) + public function authenticate(string $email, string $password): CustomerInterface { try { - $customer = $this->customerRepository->get($username); + $customer = $this->customerRepository->get($email); } catch (NoSuchEntityException $e) { throw new InvalidEmailOrPasswordException(__('Invalid login or password.')); } @@ -664,8 +702,17 @@ private function isEmailChangedConfirmationRequired(CustomerInterface $customer) /** * @inheritdoc + * + * @param int $customerId + * @param string $resetPasswordLinkToken + * @return bool + * @throws ExpiredException + * @throws InputException + * @throws InputMismatchException + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken) + public function validateResetPasswordLinkToken(int $customerId, string $resetPasswordLinkToken): bool { $this->validateResetPasswordToken($customerId, $resetPasswordLinkToken); return true; @@ -673,8 +720,17 @@ public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkTo /** * @inheritdoc + * + * @param string $email + * @param string $template + * @param int|null $websiteId + * @return bool + * @throws InputException + * @throws InputMismatchException + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function initiatePasswordReset($email, $template, $websiteId = null) + public function initiatePasswordReset(string $email, string $template, int $websiteId = null): bool { if ($websiteId === null) { $websiteId = $this->storeManager->getStore()->getWebsiteId(); @@ -714,7 +770,7 @@ public function initiatePasswordReset($email, $template, $websiteId = null) * @param string $template * @throws InputException */ - private function handleUnknownTemplate($template) + private function handleUnknownTemplate(string $template) { throw new InputException( __( @@ -732,8 +788,18 @@ private function handleUnknownTemplate($template) /** * @inheritdoc + * + * @param string $email + * @param string $resetToken + * @param string $newPassword + * @return bool + * @throws ExpiredException + * @throws InputException + * @throws InputMismatchException + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function resetPassword($email, $resetToken, $newPassword) + public function resetPassword(string $email, string $resetToken, string $newPassword): bool { if (!$email) { $params = ['fieldName' => 'email']; @@ -774,7 +840,7 @@ public function resetPassword($email, $resetToken, $newPassword) * @return void * @throws InputException */ - protected function checkPasswordStrength($password) + protected function checkPasswordStrength(string $password) { $length = $this->stringHelper->strlen($password); if ($length > self::MAX_PASSWORD_LENGTH) { @@ -819,7 +885,7 @@ protected function checkPasswordStrength($password) * @param string $password * @return int */ - protected function makeRequiredCharactersCheck($password) + protected function makeRequiredCharactersCheck(string $password): int { $counter = 0; $requiredNumber = $this->scopeConfig->getValue(self::XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER); @@ -852,15 +918,20 @@ protected function makeRequiredCharactersCheck($password) * * @return int */ - protected function getMinPasswordLength() + protected function getMinPasswordLength(): int { return $this->scopeConfig->getValue(self::XML_PATH_MINIMUM_PASSWORD_LENGTH); } /** * @inheritdoc + * + * @param int $customerId + * @return string + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function getConfirmationStatus($customerId) + public function getConfirmationStatus(int $customerId): string { // load customer by id $customer = $this->customerRepository->getById($customerId); @@ -902,11 +973,16 @@ public function createAccount(CustomerInterface $customer, $password = null, $re /** * @inheritdoc * + * @param CustomerInterface $customer + * @param string $hash + * @param string $redirectUrl + * @return CustomerInterface + * @throws InputException * @throws InputMismatchException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function createAccountWithPasswordHash(CustomerInterface $customer, $hash, $redirectUrl = '') + public function createAccountWithPasswordHash(CustomerInterface $customer, string $hash, string $redirectUrl = ''): CustomerInterface { // This logic allows an existing customer to be added to a different store. No new account is created. // The plan is to move this logic into a new method called something like 'registerAccountWithStore' @@ -987,20 +1063,30 @@ public function createAccountWithPasswordHash(CustomerInterface $customer, $hash /** * @inheritdoc + * + * @param int $customerId + * @return AddressInterface + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function getDefaultBillingAddress($customerId) + public function getDefaultBillingAddress(int $customerId): AddressInterface { $customer = $this->customerRepository->getById($customerId); - return $this->getAddressById($customer, $customer->getDefaultBilling()); + return $this->getAddressById($customer, (int) $customer->getDefaultBilling()); } /** * @inheritdoc + * + * @param int $customerId + * @return AddressInterface + * @throws LocalizedException + * @throws NoSuchEntityException */ - public function getDefaultShippingAddress($customerId) + public function getDefaultShippingAddress(int $customerId): AddressInterface { $customer = $this->customerRepository->getById($customerId); - return $this->getAddressById($customer, $customer->getDefaultShipping()); + return $this->getAddressById($customer, (int) $customer->getDefaultShipping()); } /** @@ -1012,7 +1098,7 @@ public function getDefaultShippingAddress($customerId) * @throws LocalizedException * @throws NoSuchEntityException */ - protected function sendEmailConfirmation(CustomerInterface $customer, $redirectUrl) + protected function sendEmailConfirmation(CustomerInterface $customer, string $redirectUrl) { try { $hash = $this->customerRegistry->retrieveSecureData($customer->getId())->getPasswordHash(); @@ -1032,11 +1118,18 @@ protected function sendEmailConfirmation(CustomerInterface $customer, $redirectU } /** - * @inheritdoc - * + * @param string $email + * @param string $currentPassword + * @param string $newPassword + * @return bool + * @throws InputException + * @throws InputMismatchException * @throws InvalidEmailOrPasswordException + * @throws LocalizedException + * @throws NoSuchEntityException + * @throws UserLockedException */ - public function changePassword($email, $currentPassword, $newPassword) + public function changePassword(string $email, string $currentPassword, string $newPassword): bool { try { $customer = $this->customerRepository->get($email); @@ -1047,11 +1140,18 @@ public function changePassword($email, $currentPassword, $newPassword) } /** - * @inheritdoc - * + * @param int $customerId + * @param string $currentPassword + * @param string $newPassword + * @return bool + * @throws InputException + * @throws InputMismatchException * @throws InvalidEmailOrPasswordException + * @throws LocalizedException + * @throws NoSuchEntityException + * @throws UserLockedException */ - public function changePasswordById($customerId, $currentPassword, $newPassword) + public function changePasswordById(int $customerId, string $currentPassword, string $newPassword): bool { try { $customer = $this->customerRepository->getById($customerId); @@ -1075,7 +1175,7 @@ public function changePasswordById($customerId, $currentPassword, $newPassword) * @throws NoSuchEntityException * @throws UserLockedException */ - private function changePasswordForCustomer($customer, $currentPassword, $newPassword) + private function changePasswordForCustomer(CustomerInterface $customer, string $currentPassword, string $newPassword): bool { try { $this->authentication->authenticate($customer->getId(), $currentPassword); @@ -1104,15 +1204,16 @@ private function changePasswordForCustomer($customer, $currentPassword, $newPass * @param string $password * @return string */ - protected function createPasswordHash($password) + protected function createPasswordHash(string $password): string { return $this->encryptor->getHash($password, true); } /** - * @inheritdoc + * @param CustomerInterface $customer + * @return ValidationResultsInterface|string[] */ - public function validate(CustomerInterface $customer) + public function validate(CustomerInterface $customer): ValidationResultsInterface { $validationResults = $this->validationResultsDataFactory->create(); @@ -1138,8 +1239,18 @@ public function validate(CustomerInterface $customer) /** * @inheritdoc */ - public function isEmailAvailable($customerEmail, $websiteId = null) + public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool { + $guestLoginConfig = $this->scopeConfig->getValue( + self::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_WEBSITE, + $websiteId + ); + + if ($guestLoginConfig) { + return true; + } + try { if ($websiteId === null) { $websiteId = $this->storeManager->getStore()->getWebsiteId(); @@ -1152,9 +1263,12 @@ public function isEmailAvailable($customerEmail, $websiteId = null) } /** - * @inheritDoc + * @param int $customerWebsiteId + * @param int $storeId + * @return bool + * @throws LocalizedException */ - public function isCustomerInStore($customerWebsiteId, $storeId) + public function isCustomerInStore(int $customerWebsiteId, int $storeId): bool { $ids = []; if ((bool)$this->configShare->isWebsiteScope()) { @@ -1175,7 +1289,7 @@ public function isCustomerInStore($customerWebsiteId, $storeId) * @return bool * @throws LocalizedException */ - public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer) + public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer): bool { if (!$this->isCustomerInStore($customer->getWebsiteId(), $customer->getStoreId())) { throw new LocalizedException(__('The store view is not in the associated website.')); @@ -1189,8 +1303,7 @@ public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer) * * @param int $customerId * @param string $resetPasswordLinkToken - * - * @return bool + * @return void * @throws ExpiredException If token is expired * @throws InputException If token or customer id is invalid * @throws InputMismatchException If token is mismatched @@ -1198,7 +1311,7 @@ public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer) * @throws NoSuchEntityException If customer doesn't exist * @SuppressWarnings(PHPMD.LongVariable) */ - private function validateResetPasswordToken(int $customerId, string $resetPasswordLinkToken): bool + private function validateResetPasswordToken(int $customerId, string $resetPasswordLinkToken): void { if (!$customerId) { throw new InputException( @@ -1220,7 +1333,6 @@ private function validateResetPasswordToken(int $customerId, string $resetPasswo } elseif ($this->isResetPasswordLinkTokenExpired($rpToken, $rpTokenCreatedAt)) { throw new ExpiredException(__('The password token is expired. Reset and try again.')); } - return true; } /** @@ -1228,10 +1340,10 @@ private function validateResetPasswordToken(int $customerId, string $resetPasswo * * @param int $customerId * @return bool - * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found + * @throws NoSuchEntityException If group is not found * @throws LocalizedException */ - public function isReadonly($customerId) + public function isReadonly(int $customerId): bool { $customer = $this->customerRegistry->retrieveSecureData($customerId); return !$customer->getDeleteable(); @@ -1244,19 +1356,19 @@ public function isReadonly($customerId) * @param string $type * @param string $backUrl * @param string $storeId - * @param string $sendemailStoreId + * @param string|null $sendemailStoreId * @return $this * @throws LocalizedException * @deprecated 100.1.0 * @see EmailNotification::newAccount() */ protected function sendNewAccountEmail( - $customer, - $type = self::NEW_ACCOUNT_EMAIL_REGISTERED, - $backUrl = '', - $storeId = '0', - $sendemailStoreId = null - ) { + CustomerInterface $customer, + string $type = self::NEW_ACCOUNT_EMAIL_REGISTERED, + string $backUrl = '', + string $storeId = '0', + string $sendemailStoreId = null + ): static { $types = $this->getTemplateTypes(); if (!isset($types[$type])) { @@ -1294,7 +1406,7 @@ protected function sendNewAccountEmail( * @deprecated 100.1.0 * @see EmailNotification::credentialsChanged() */ - protected function sendPasswordResetNotificationEmail($customer) + protected function sendPasswordResetNotificationEmail(CustomerInterface $customer): static { return $this->sendPasswordResetConfirmationEmail($customer); } @@ -1305,11 +1417,11 @@ protected function sendPasswordResetNotificationEmail($customer) * @param CustomerInterface $customer * @param int|string|null $defaultStoreId * @return int - * @deprecated 100.1.0 - * @see StoreManagerInterface::getWebsite() * @throws LocalizedException + *@see StoreManagerInterface::getWebsite() + * @deprecated 100.1.0 */ - protected function getWebsiteStoreId($customer, $defaultStoreId = null) + protected function getWebsiteStoreId(CustomerInterface $customer, int|string $defaultStoreId = null): int|string|null { if ($customer->getWebsiteId() != 0 && empty($defaultStoreId)) { $storeIds = $this->storeManager->getWebsite($customer->getWebsiteId())->getStoreIds(); @@ -1326,7 +1438,8 @@ protected function getWebsiteStoreId($customer, $defaultStoreId = null) * @deprecated 100.1.0 * @see EmailNotification::TEMPLATE_TYPES */ - protected function getTemplateTypes() + #[ArrayShape([self::NEW_ACCOUNT_EMAIL_REGISTERED => "string", self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD => "string", self::NEW_ACCOUNT_EMAIL_CONFIRMED => "string", self::NEW_ACCOUNT_EMAIL_CONFIRMATION => "string"])] + protected function getTemplateTypes(): array { /** * self::NEW_ACCOUNT_EMAIL_REGISTERED welcome email, when confirmation is disabled @@ -1354,20 +1467,20 @@ protected function getTemplateTypes() * @param string $sender configuration path of email identity * @param array $templateParams * @param int|null $storeId - * @param string $email + * @param string|null $email * @return $this - * @throws MailException + * @throws MailException|LocalizedException * @deprecated 100.1.0 * @see EmailNotification::sendEmailTemplate() */ protected function sendEmailTemplate( - $customer, - $template, - $sender, - $templateParams = [], - $storeId = null, - $email = null - ) { + CustomerInterface $customer, + string $template, + string $sender, + array $templateParams = [], + int $storeId = null, + string $email = null + ): static { $templateId = $this->scopeConfig->getValue( $template, ScopeInterface::SCOPE_STORE, @@ -1408,7 +1521,7 @@ protected function sendEmailTemplate( * @deprecated 101.0.4 * @see AccountConfirmation::isConfirmationRequired */ - protected function isConfirmationRequired($customer) + protected function isConfirmationRequired(CustomerInterface $customer): bool { return $this->accountConfirmation->isConfirmationRequired( $customer->getWebsiteId(), @@ -1425,7 +1538,7 @@ protected function isConfirmationRequired($customer) * @deprecated 101.0.4 * @see AccountConfirmation::isConfirmationRequired */ - protected function canSkipConfirmation($customer) + protected function canSkipConfirmation(CustomerInterface $customer): bool { if (!$customer->getId() || $customer->getEmail() === null) { return false; @@ -1449,7 +1562,7 @@ protected function canSkipConfirmation($customer) * @param string $rpTokenCreatedAt * @return bool */ - public function isResetPasswordLinkTokenExpired($rpToken, $rpTokenCreatedAt) + public function isResetPasswordLinkTokenExpired(string $rpToken, string $rpTokenCreatedAt): bool { if (empty($rpToken) || empty($rpTokenCreatedAt)) { return true; @@ -1515,7 +1628,7 @@ public function changeResetPasswordLinkToken(CustomerInterface $customer, string * @deprecated 100.1.0 * @see EmailNotification::passwordReminder() */ - public function sendPasswordReminderEmail($customer) + public function sendPasswordReminderEmail(CustomerInterface $customer): static { $storeId = $this->storeManager->getStore()->getId(); if (!$storeId) { @@ -1545,7 +1658,7 @@ public function sendPasswordReminderEmail($customer) * @deprecated 100.1.0 * @see EmailNotification::passwordResetConfirmation() */ - public function sendPasswordResetConfirmationEmail($customer) + public function sendPasswordResetConfirmationEmail(CustomerInterface $customer): static { $storeId = $this->storeManager->getStore()->getId(); if (!$storeId) { @@ -1572,7 +1685,7 @@ public function sendPasswordResetConfirmationEmail($customer) * @param int $addressId * @return AddressInterface|null */ - protected function getAddressById(CustomerInterface $customer, $addressId) + protected function getAddressById(CustomerInterface $customer, int $addressId): ?AddressInterface { foreach ($customer->getAddresses() as $address) { if ($address->getId() == $addressId) { @@ -1591,7 +1704,7 @@ protected function getAddressById(CustomerInterface $customer, $addressId) * @deprecated 100.1.0 * @see EmailNotification::getFullCustomerObject() */ - protected function getFullCustomerObject($customer) + protected function getFullCustomerObject(CustomerInterface $customer): Data\CustomerSecure { // No need to flatten the custom attributes or nested objects since the only usage is for email templates and // object passed for events @@ -1611,7 +1724,7 @@ protected function getFullCustomerObject($customer) * @param string $password * @return string */ - public function getPasswordHash($password) + public function getPasswordHash(string $password): string { return $this->encryptor->getHash($password, true); } @@ -1622,7 +1735,7 @@ public function getPasswordHash($password) * @param CustomerInterface $customer * @throws NoSuchEntityException */ - private function disableAddressValidation($customer) + private function disableAddressValidation(CustomerInterface $customer) { foreach ($customer->getAddresses() as $address) { $addressModel = $this->addressRegistry->retrieve($address->getId()); @@ -1635,7 +1748,7 @@ private function disableAddressValidation($customer) * * @return EmailNotificationInterface */ - private function getEmailNotification() + private function getEmailNotification(): EmailNotificationInterface { if (!($this->emailNotification instanceof EmailNotificationInterface)) { return \Magento\Framework\App\ObjectManager::getInstance()->get( @@ -1652,7 +1765,7 @@ private function getEmailNotification() * @param Customer $customer * @return void */ - private function setIgnoreValidationFlag($customer) + private function setIgnoreValidationFlag(Customer $customer) { $customer->setData('ignore_validation_flag', true); } @@ -1664,7 +1777,7 @@ private function setIgnoreValidationFlag($customer) * @param int|null $storeId * @return bool */ - private function isAddressAllowedForWebsite(AddressInterface $address, $storeId): bool + private function isAddressAllowedForWebsite(AddressInterface $address, ?int $storeId): bool { $allowedCountries = $this->allowedCountriesReader->getAllowedCountries(ScopeInterface::SCOPE_STORE, $storeId); From fd9ee59e40176ae5aaeab34564ebf41a8d3dcc40 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Mon, 12 Dec 2022 17:48:04 +0530 Subject: [PATCH 010/277] AC-6695: Guest Checkout Fix --- .../Magento/Checkout/etc/adminhtml/system.xml | 2 +- .../Api/AccountManagementInterface.php | 135 ++++---- .../Customer/Model/AccountManagement.php | 325 ++++++------------ 3 files changed, 177 insertions(+), 285 deletions(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index 10c885d8c0dd4..14278a34723a9 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -27,7 +27,7 @@ - \Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions + Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index 164dfa2ba1714..ae70d313e211e 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -7,14 +7,7 @@ namespace Magento\Customer\Api; -use Magento\Customer\Api\Data\AddressInterface; -use Magento\Customer\Api\Data\CustomerInterface; -use Magento\Customer\Api\Data\ValidationResultsInterface; use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Exception\State\ExpiredException; -use Magento\Framework\Exception\State\InputMismatchException; /** * Interface for managing customers accounts. @@ -35,84 +28,84 @@ interface AccountManagementInterface /** * Create customer account. Perform necessary business operations like sending email. * - * @param CustomerInterface $customer - * @param string|null $password + * @param \Magento\Customer\Api\Data\CustomerInterface $customer + * @param string $password * @param string $redirectUrl - * @return CustomerInterface - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\CustomerInterface + * @throws \Magento\Framework\Exception\LocalizedException */ public function createAccount( \Magento\Customer\Api\Data\CustomerInterface $customer, - $password = null, - $redirectUrl = '' + $password = null, + $redirectUrl = '' ); /** * Create customer account using provided hashed password. Should not be exposed as a webapi. * - * @param CustomerInterface $customer + * @param \Magento\Customer\Api\Data\CustomerInterface $customer * @param string $hash Password hash that we can save directly * @param string $redirectUrl URL fed to welcome email templates. Can be used by templates to, for example, direct * the customer to a product they were looking at after pressing confirmation link. - * @return CustomerInterface - * @throws InputException If bad input is provided - * @throws InputMismatchException If the provided email is already used - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\CustomerInterface + * @throws \Magento\Framework\Exception\InputException If bad input is provided + * @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used + * @throws \Magento\Framework\Exception\LocalizedException */ public function createAccountWithPasswordHash( - CustomerInterface $customer, - string $hash, - string $redirectUrl = '' - ): CustomerInterface; + \Magento\Customer\Api\Data\CustomerInterface $customer, + $hash, + $redirectUrl = '' + ); /** * Validate customer data. * - * @param CustomerInterface $customer - * @return ValidationResultsInterface - * @throws LocalizedException + * @param \Magento\Customer\Api\Data\CustomerInterface $customer + * @return \Magento\Customer\Api\Data\ValidationResultsInterface + * @throws \Magento\Framework\Exception\LocalizedException */ - public function validate(CustomerInterface $customer): ValidationResultsInterface; + public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer); /** * Check if customer can be deleted. * * @param int $customerId * @return bool - * @throws NoSuchEntityException If group is not found - * @throws LocalizedException + * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found + * @throws \Magento\Framework\Exception\LocalizedException */ - public function isReadonly(int $customerId): bool; + public function isReadonly($customerId); /** * Activate a customer account using a key that was sent in a confirmation email. * * @param string $email * @param string $confirmationKey - * @return CustomerInterface - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\CustomerInterface + * @throws \Magento\Framework\Exception\LocalizedException */ - public function activate(string $email, string $confirmationKey): CustomerInterface; + public function activate($email, $confirmationKey); /** * Activate a customer account using a key that was sent in a confirmation email. * * @param int $customerId * @param string $confirmationKey - * @return CustomerInterface - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\CustomerInterface + * @throws \Magento\Framework\Exception\LocalizedException */ - public function activateById(int $customerId, string $confirmationKey): CustomerInterface; + public function activateById($customerId, $confirmationKey); /** * Authenticate a customer by username and password * * @param string $email * @param string $password - * @return CustomerInterface - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\CustomerInterface + * @throws \Magento\Framework\Exception\LocalizedException */ - public function authenticate(string $email, string $password): CustomerInterface; + public function authenticate($email, $password); /** * Change customer password. @@ -121,9 +114,9 @@ public function authenticate(string $email, string $password): CustomerInterface * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function changePassword(string $email, string $currentPassword, string $newPassword): bool; + public function changePassword($email, $currentPassword, $newPassword); /** * Change customer password. @@ -132,20 +125,20 @@ public function changePassword(string $email, string $currentPassword, string $n * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function changePasswordById(int $customerId, string $currentPassword, string $newPassword): bool; + public function changePasswordById($customerId, $currentPassword, $newPassword); /** * Send an email to the customer with a password reset link. * * @param string $email * @param string $template - * @param int|null $websiteId + * @param int $websiteId * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function initiatePasswordReset(string $email, string $template, int $websiteId = null): bool; + public function initiatePasswordReset($email, $template, $websiteId = null); /** * Reset customer password. @@ -156,10 +149,10 @@ public function initiatePasswordReset(string $email, string $template, int $webs * @param string $newPassword * * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException * @throws InputException */ - public function resetPassword(string $email, string $resetToken, string $newPassword): bool; + public function resetPassword($email, $resetToken, $newPassword); /** * Check if password reset token is valid. @@ -169,22 +162,22 @@ public function resetPassword(string $email, string $resetToken, string $newPass * @param string $resetPasswordLinkToken * * @return bool True if the token is valid - * @throws InputMismatchException If token is mismatched - * @throws ExpiredException If token is expired - * @throws InputException If token or customer id is invalid - * @throws NoSuchEntityException If customer doesn't exist - * @throws LocalizedException + * @throws \Magento\Framework\Exception\State\InputMismatchException If token is mismatched + * @throws \Magento\Framework\Exception\State\ExpiredException If token is expired + * @throws \Magento\Framework\Exception\InputException If token or customer id is invalid + * @throws \Magento\Framework\Exception\NoSuchEntityException If customer doesn't exist + * @throws \Magento\Framework\Exception\LocalizedException */ - public function validateResetPasswordLinkToken(int $customerId, string $resetPasswordLinkToken): bool; + public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); /** * Gets the account confirmation status. * * @param int $customerId * @return string - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function getConfirmationStatus(int $customerId): string; + public function getConfirmationStatus($customerId); /** * Resend confirmation email. @@ -193,19 +186,19 @@ public function getConfirmationStatus(int $customerId): string; * @param int $websiteId * @param string $redirectUrl * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function resendConfirmation(string $email, int $websiteId, string $redirectUrl = ''): bool; + public function resendConfirmation($email, $websiteId, $redirectUrl = ''); /** * Check if given email is associated with a customer account in given website. * * @param string $customerEmail - * @param int|null $websiteId If not set, will use the current websiteId + * @param int $websiteId If not set, will use the current websiteId * @return bool - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool; + public function isEmailAvailable($customerEmail, $websiteId = null); /** * Check store availability for customer given the customerId. @@ -213,29 +206,29 @@ public function isEmailAvailable(string $customerEmail, int $websiteId = null): * @param int $customerWebsiteId * @param int $storeId * @return bool - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function isCustomerInStore(int $customerWebsiteId, int $storeId): bool; + public function isCustomerInStore($customerWebsiteId, $storeId); /** * Retrieve default billing address for the given customerId. * * @param int $customerId - * @return AddressInterface - * @throws NoSuchEntityException If the customer Id is invalid - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\AddressInterface + * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid + * @throws \Magento\Framework\Exception\LocalizedException */ - public function getDefaultBillingAddress(int $customerId): Data\AddressInterface; + public function getDefaultBillingAddress($customerId); /** * Retrieve default shipping address for the given customerId. * * @param int $customerId - * @return AddressInterface - * @throws NoSuchEntityException If the customer Id is invalid - * @throws LocalizedException + * @return \Magento\Customer\Api\Data\AddressInterface + * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid + * @throws \Magento\Framework\Exception\LocalizedException */ - public function getDefaultShippingAddress(int $customerId): AddressInterface; + public function getDefaultShippingAddress($customerId); /** * Return hashed password, which can be directly saved to database. @@ -243,5 +236,5 @@ public function getDefaultShippingAddress(int $customerId): AddressInterface; * @param string $password * @return string */ - public function getPasswordHash(string $password): string; + public function getPasswordHash($password); } diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index ba57c1f530afc..ee114bb284617 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -7,14 +7,12 @@ namespace Magento\Customer\Model; -use JetBrains\PhpStorm\ArrayShape; use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\CustomerMetadataInterface; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Api\Data\AddressInterface; use Magento\Customer\Api\Data\CustomerInterface; -use Magento\Customer\Api\Data\ValidationResultsInterface; use Magento\Customer\Api\Data\ValidationResultsInterfaceFactory; use Magento\Customer\Api\SessionCleanerInterface; use Magento\Customer\Helper\View as CustomerViewHelper; @@ -22,7 +20,6 @@ use Magento\Customer\Model\Customer as CustomerModel; use Magento\Customer\Model\Customer\CredentialsValidator; use Magento\Customer\Model\ForgotPasswordToken\GetCustomerByToken; -use Magento\Customer\Model\Logger as CustomerLogger; use Magento\Customer\Model\Metadata\Validator; use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory; use Magento\Directory\Model\AllowedCountries; @@ -60,6 +57,7 @@ use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; use Psr\Log\LoggerInterface as PsrLogger; +use Magento\Customer\Model\Logger as CustomerLogger; /** * Handle various customer account actions @@ -222,27 +220,27 @@ class AccountManagement implements AccountManagementInterface /** * @var CustomerFactory */ - private CustomerFactory $customerFactory; + private $customerFactory; /** * @var ValidationResultsInterfaceFactory */ - private ValidationResultsInterfaceFactory $validationResultsDataFactory; + private $validationResultsDataFactory; /** * @var ManagerInterface */ - private ManagerInterface $eventManager; + private $eventManager; /** * @var StoreManagerInterface */ - private StoreManagerInterface $storeManager; + private $storeManager; /** * @var Random */ - private Random $mathRandom; + private $mathRandom; /** * @var Validator @@ -252,147 +250,147 @@ class AccountManagement implements AccountManagementInterface /** * @var AddressRepositoryInterface */ - private AddressRepositoryInterface $addressRepository; + private $addressRepository; /** * @var CustomerMetadataInterface */ - private CustomerMetadataInterface $customerMetadataService; + private $customerMetadataService; /** * @var PsrLogger */ - protected PsrLogger $logger; + protected $logger; /** * @var Encryptor */ - private Encryptor $encryptor; + private $encryptor; /** * @var CustomerRegistry */ - private CustomerRegistry $customerRegistry; + private $customerRegistry; /** * @var ConfigShare */ - private ConfigShare $configShare; + private $configShare; /** * @var StringHelper */ - protected StringHelper $stringHelper; + protected $stringHelper; /** * @var CustomerRepositoryInterface */ - private CustomerRepositoryInterface $customerRepository; + private $customerRepository; /** * @var ScopeConfigInterface */ - private ScopeConfigInterface $scopeConfig; + private $scopeConfig; /** * @var TransportBuilder */ - private TransportBuilder $transportBuilder; + private $transportBuilder; /** * @var DataObjectProcessor */ - protected DataObjectProcessor $dataProcessor; + protected $dataProcessor; /** * @var Registry */ - protected Registry $registry; + protected $registry; /** * @var CustomerViewHelper */ - protected CustomerViewHelper $customerViewHelper; + protected $customerViewHelper; /** * @var DateTime */ - protected DateTime $dateTime; + protected $dateTime; /** * @var ObjectFactory */ - protected ObjectFactory $objectFactory; + protected $objectFactory; /** * @var ExtensibleDataObjectConverter */ - protected ExtensibleDataObjectConverter $extensibleDataObjectConverter; + protected $extensibleDataObjectConverter; /** * @var CustomerModel */ - protected Customer $customerModel; + protected $customerModel; /** * @var AuthenticationInterface */ - protected AuthenticationInterface $authentication; + protected $authentication; /** * @var EmailNotificationInterface */ - private EmailNotificationInterface $emailNotification; + private $emailNotification; /** * @var Backend */ - private Backend $eavValidator; + private $eavValidator; /** * @var CredentialsValidator */ - private CredentialsValidator $credentialsValidator; + private $credentialsValidator; /** * @var DateTimeFactory */ - private DateTimeFactory $dateTimeFactory; + private $dateTimeFactory; /** * @var AccountConfirmation */ - private AccountConfirmation $accountConfirmation; + private $accountConfirmation; /** * @var SearchCriteriaBuilder */ - private SearchCriteriaBuilder $searchCriteriaBuilder; + private $searchCriteriaBuilder; /** * @var AddressRegistry */ - private AddressRegistry $addressRegistry; + private $addressRegistry; /** * @var AllowedCountries */ - private AllowedCountries $allowedCountriesReader; + private $allowedCountriesReader; /** * @var GetCustomerByToken */ - private GetCustomerByToken $getByToken; + private $getByToken; /** * @var SessionCleanerInterface */ - private SessionCleanerInterface $sessionCleaner; + private $sessionCleaner; /** * @var AuthorizationInterface */ - private AuthorizationInterface $authorization; + private $authorization; /** * @var CustomerLogger @@ -530,16 +528,8 @@ public function __construct( /** * @inheritdoc - * - * @param string $email - * @param int $websiteId - * @param string $redirectUrl - * @return bool - * @throws InvalidTransitionException - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function resendConfirmation(string $email, int $websiteId, string $redirectUrl = ''): bool + public function resendConfirmation($email, $websiteId = null, $redirectUrl = '') { $customer = $this->customerRepository->get($email, $websiteId); if (!$customer->getConfirmation()) { @@ -565,17 +555,8 @@ public function resendConfirmation(string $email, int $websiteId, string $redire /** * @inheritdoc - * - * @param string $email - * @param string $confirmationKey - * @return CustomerInterface - * @throws InputException - * @throws InputMismatchException - * @throws InvalidTransitionException - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function activate(string $email, string $confirmationKey): CustomerInterface + public function activate($email, $confirmationKey) { $customer = $this->customerRepository->get($email); return $this->activateCustomer($customer, $confirmationKey); @@ -583,17 +564,8 @@ public function activate(string $email, string $confirmationKey): CustomerInterf /** * @inheritdoc - * - * @param int $customerId - * @param string $confirmationKey - * @return CustomerInterface - * @throws InputException - * @throws InputMismatchException - * @throws InvalidTransitionException - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function activateById(int $customerId, string $confirmationKey): CustomerInterface + public function activateById($customerId, $confirmationKey) { $customer = $this->customerRepository->getById($customerId); return $this->activateCustomer($customer, $confirmationKey); @@ -611,7 +583,7 @@ public function activateById(int $customerId, string $confirmationKey): Customer * @throws LocalizedException * @throws NoSuchEntityException */ - private function activateCustomer(CustomerInterface $customer, string $confirmationKey): CustomerInterface + private function activateCustomer($customer, $confirmationKey) { // check if customer is inactive if (!$customer->getConfirmation()) { @@ -642,19 +614,11 @@ private function activateCustomer(CustomerInterface $customer, string $confirmat /** * @inheritdoc - * - * @param string $email - * @param string $password - * @return CustomerInterface - * @throws EmailNotConfirmedException - * @throws InvalidEmailOrPasswordException - * @throws LocalizedException - * @throws UserLockedException */ - public function authenticate(string $email, string $password): CustomerInterface + public function authenticate($username, $password) { try { - $customer = $this->customerRepository->get($email); + $customer = $this->customerRepository->get($username); } catch (NoSuchEntityException $e) { throw new InvalidEmailOrPasswordException(__('Invalid login or password.')); } @@ -702,17 +666,8 @@ private function isEmailChangedConfirmationRequired(CustomerInterface $customer) /** * @inheritdoc - * - * @param int $customerId - * @param string $resetPasswordLinkToken - * @return bool - * @throws ExpiredException - * @throws InputException - * @throws InputMismatchException - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function validateResetPasswordLinkToken(int $customerId, string $resetPasswordLinkToken): bool + public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken) { $this->validateResetPasswordToken($customerId, $resetPasswordLinkToken); return true; @@ -720,17 +675,8 @@ public function validateResetPasswordLinkToken(int $customerId, string $resetPas /** * @inheritdoc - * - * @param string $email - * @param string $template - * @param int|null $websiteId - * @return bool - * @throws InputException - * @throws InputMismatchException - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function initiatePasswordReset(string $email, string $template, int $websiteId = null): bool + public function initiatePasswordReset($email, $template, $websiteId = null) { if ($websiteId === null) { $websiteId = $this->storeManager->getStore()->getWebsiteId(); @@ -770,12 +716,12 @@ public function initiatePasswordReset(string $email, string $template, int $webs * @param string $template * @throws InputException */ - private function handleUnknownTemplate(string $template) + private function handleUnknownTemplate($template) { throw new InputException( __( 'Invalid value of "%value" provided for the %fieldName field. ' - . 'Possible values: %template1 or %template2.', + . 'Possible values: %template1 or %template2.', [ 'value' => $template, 'fieldName' => 'template', @@ -788,18 +734,8 @@ private function handleUnknownTemplate(string $template) /** * @inheritdoc - * - * @param string $email - * @param string $resetToken - * @param string $newPassword - * @return bool - * @throws ExpiredException - * @throws InputException - * @throws InputMismatchException - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function resetPassword(string $email, string $resetToken, string $newPassword): bool + public function resetPassword($email, $resetToken, $newPassword) { if (!$email) { $params = ['fieldName' => 'email']; @@ -840,7 +776,7 @@ public function resetPassword(string $email, string $resetToken, string $newPass * @return void * @throws InputException */ - protected function checkPasswordStrength(string $password) + protected function checkPasswordStrength($password) { $length = $this->stringHelper->strlen($password); if ($length > self::MAX_PASSWORD_LENGTH) { @@ -885,7 +821,7 @@ protected function checkPasswordStrength(string $password) * @param string $password * @return int */ - protected function makeRequiredCharactersCheck(string $password): int + protected function makeRequiredCharactersCheck($password) { $counter = 0; $requiredNumber = $this->scopeConfig->getValue(self::XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER); @@ -918,20 +854,15 @@ protected function makeRequiredCharactersCheck(string $password): int * * @return int */ - protected function getMinPasswordLength(): int + protected function getMinPasswordLength() { return $this->scopeConfig->getValue(self::XML_PATH_MINIMUM_PASSWORD_LENGTH); } /** * @inheritdoc - * - * @param int $customerId - * @return string - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function getConfirmationStatus(int $customerId): string + public function getConfirmationStatus($customerId) { // load customer by id $customer = $this->customerRepository->getById($customerId); @@ -973,16 +904,11 @@ public function createAccount(CustomerInterface $customer, $password = null, $re /** * @inheritdoc * - * @param CustomerInterface $customer - * @param string $hash - * @param string $redirectUrl - * @return CustomerInterface - * @throws InputException * @throws InputMismatchException - * @throws LocalizedException - * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function createAccountWithPasswordHash(CustomerInterface $customer, string $hash, string $redirectUrl = ''): CustomerInterface + public function createAccountWithPasswordHash(CustomerInterface $customer, $hash, $redirectUrl = '') { // This logic allows an existing customer to be added to a different store. No new account is created. // The plan is to move this logic into a new method called something like 'registerAccountWithStore' @@ -1063,30 +989,20 @@ public function createAccountWithPasswordHash(CustomerInterface $customer, strin /** * @inheritdoc - * - * @param int $customerId - * @return AddressInterface - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function getDefaultBillingAddress(int $customerId): AddressInterface + public function getDefaultBillingAddress($customerId) { $customer = $this->customerRepository->getById($customerId); - return $this->getAddressById($customer, (int) $customer->getDefaultBilling()); + return $this->getAddressById($customer, $customer->getDefaultBilling()); } /** * @inheritdoc - * - * @param int $customerId - * @return AddressInterface - * @throws LocalizedException - * @throws NoSuchEntityException */ - public function getDefaultShippingAddress(int $customerId): AddressInterface + public function getDefaultShippingAddress($customerId) { $customer = $this->customerRepository->getById($customerId); - return $this->getAddressById($customer, (int) $customer->getDefaultShipping()); + return $this->getAddressById($customer, $customer->getDefaultShipping()); } /** @@ -1098,7 +1014,7 @@ public function getDefaultShippingAddress(int $customerId): AddressInterface * @throws LocalizedException * @throws NoSuchEntityException */ - protected function sendEmailConfirmation(CustomerInterface $customer, string $redirectUrl) + protected function sendEmailConfirmation(CustomerInterface $customer, $redirectUrl) { try { $hash = $this->customerRegistry->retrieveSecureData($customer->getId())->getPasswordHash(); @@ -1118,18 +1034,11 @@ protected function sendEmailConfirmation(CustomerInterface $customer, string $re } /** - * @param string $email - * @param string $currentPassword - * @param string $newPassword - * @return bool - * @throws InputException - * @throws InputMismatchException + * @inheritdoc + * * @throws InvalidEmailOrPasswordException - * @throws LocalizedException - * @throws NoSuchEntityException - * @throws UserLockedException */ - public function changePassword(string $email, string $currentPassword, string $newPassword): bool + public function changePassword($email, $currentPassword, $newPassword) { try { $customer = $this->customerRepository->get($email); @@ -1140,18 +1049,11 @@ public function changePassword(string $email, string $currentPassword, string $n } /** - * @param int $customerId - * @param string $currentPassword - * @param string $newPassword - * @return bool - * @throws InputException - * @throws InputMismatchException + * @inheritdoc + * * @throws InvalidEmailOrPasswordException - * @throws LocalizedException - * @throws NoSuchEntityException - * @throws UserLockedException */ - public function changePasswordById(int $customerId, string $currentPassword, string $newPassword): bool + public function changePasswordById($customerId, $currentPassword, $newPassword) { try { $customer = $this->customerRepository->getById($customerId); @@ -1175,7 +1077,7 @@ public function changePasswordById(int $customerId, string $currentPassword, str * @throws NoSuchEntityException * @throws UserLockedException */ - private function changePasswordForCustomer(CustomerInterface $customer, string $currentPassword, string $newPassword): bool + private function changePasswordForCustomer($customer, $currentPassword, $newPassword) { try { $this->authentication->authenticate($customer->getId(), $currentPassword); @@ -1204,16 +1106,15 @@ private function changePasswordForCustomer(CustomerInterface $customer, string $ * @param string $password * @return string */ - protected function createPasswordHash(string $password): string + protected function createPasswordHash($password) { return $this->encryptor->getHash($password, true); } /** - * @param CustomerInterface $customer - * @return ValidationResultsInterface|string[] + * @inheritdoc */ - public function validate(CustomerInterface $customer): ValidationResultsInterface + public function validate(CustomerInterface $customer) { $validationResults = $this->validationResultsDataFactory->create(); @@ -1226,7 +1127,7 @@ public function validate(CustomerInterface $customer): ValidationResultsInterfac $result = $this->eavValidator->isValid($customerModel); if ($result === false && is_array($this->eavValidator->getMessages())) { return $validationResults->setIsValid(false)->setMessages( - // phpcs:ignore Magento2.Functions.DiscouragedFunction + // phpcs:ignore Magento2.Functions.DiscouragedFunction call_user_func_array( 'array_merge', array_values($this->eavValidator->getMessages()) @@ -1239,7 +1140,7 @@ public function validate(CustomerInterface $customer): ValidationResultsInterfac /** * @inheritdoc */ - public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool + public function isEmailAvailable($customerEmail, $websiteId = null) { $guestLoginConfig = $this->scopeConfig->getValue( self::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, @@ -1263,12 +1164,9 @@ public function isEmailAvailable(string $customerEmail, int $websiteId = null): } /** - * @param int $customerWebsiteId - * @param int $storeId - * @return bool - * @throws LocalizedException + * @inheritDoc */ - public function isCustomerInStore(int $customerWebsiteId, int $storeId): bool + public function isCustomerInStore($customerWebsiteId, $storeId) { $ids = []; if ((bool)$this->configShare->isWebsiteScope()) { @@ -1289,7 +1187,7 @@ public function isCustomerInStore(int $customerWebsiteId, int $storeId): bool * @return bool * @throws LocalizedException */ - public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer): bool + public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer) { if (!$this->isCustomerInStore($customer->getWebsiteId(), $customer->getStoreId())) { throw new LocalizedException(__('The store view is not in the associated website.')); @@ -1303,7 +1201,8 @@ public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer): * * @param int $customerId * @param string $resetPasswordLinkToken - * @return void + * + * @return bool * @throws ExpiredException If token is expired * @throws InputException If token or customer id is invalid * @throws InputMismatchException If token is mismatched @@ -1311,7 +1210,7 @@ public function validateCustomerStoreIdByWebsiteId(CustomerInterface $customer): * @throws NoSuchEntityException If customer doesn't exist * @SuppressWarnings(PHPMD.LongVariable) */ - private function validateResetPasswordToken(int $customerId, string $resetPasswordLinkToken): void + private function validateResetPasswordToken(int $customerId, string $resetPasswordLinkToken): bool { if (!$customerId) { throw new InputException( @@ -1333,6 +1232,7 @@ private function validateResetPasswordToken(int $customerId, string $resetPasswo } elseif ($this->isResetPasswordLinkTokenExpired($rpToken, $rpTokenCreatedAt)) { throw new ExpiredException(__('The password token is expired. Reset and try again.')); } + return true; } /** @@ -1340,10 +1240,10 @@ private function validateResetPasswordToken(int $customerId, string $resetPasswo * * @param int $customerId * @return bool - * @throws NoSuchEntityException If group is not found + * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found * @throws LocalizedException */ - public function isReadonly(int $customerId): bool + public function isReadonly($customerId) { $customer = $this->customerRegistry->retrieveSecureData($customerId); return !$customer->getDeleteable(); @@ -1356,19 +1256,19 @@ public function isReadonly(int $customerId): bool * @param string $type * @param string $backUrl * @param string $storeId - * @param string|null $sendemailStoreId + * @param string $sendemailStoreId * @return $this * @throws LocalizedException * @deprecated 100.1.0 * @see EmailNotification::newAccount() */ protected function sendNewAccountEmail( - CustomerInterface $customer, - string $type = self::NEW_ACCOUNT_EMAIL_REGISTERED, - string $backUrl = '', - string $storeId = '0', - string $sendemailStoreId = null - ): static { + $customer, + $type = self::NEW_ACCOUNT_EMAIL_REGISTERED, + $backUrl = '', + $storeId = '0', + $sendemailStoreId = null + ) { $types = $this->getTemplateTypes(); if (!isset($types[$type])) { @@ -1406,7 +1306,7 @@ protected function sendNewAccountEmail( * @deprecated 100.1.0 * @see EmailNotification::credentialsChanged() */ - protected function sendPasswordResetNotificationEmail(CustomerInterface $customer): static + protected function sendPasswordResetNotificationEmail($customer) { return $this->sendPasswordResetConfirmationEmail($customer); } @@ -1417,11 +1317,11 @@ protected function sendPasswordResetNotificationEmail(CustomerInterface $custome * @param CustomerInterface $customer * @param int|string|null $defaultStoreId * @return int - * @throws LocalizedException - *@see StoreManagerInterface::getWebsite() * @deprecated 100.1.0 + * @see StoreManagerInterface::getWebsite() + * @throws LocalizedException */ - protected function getWebsiteStoreId(CustomerInterface $customer, int|string $defaultStoreId = null): int|string|null + protected function getWebsiteStoreId($customer, $defaultStoreId = null) { if ($customer->getWebsiteId() != 0 && empty($defaultStoreId)) { $storeIds = $this->storeManager->getWebsite($customer->getWebsiteId())->getStoreIds(); @@ -1438,8 +1338,7 @@ protected function getWebsiteStoreId(CustomerInterface $customer, int|string $de * @deprecated 100.1.0 * @see EmailNotification::TEMPLATE_TYPES */ - #[ArrayShape([self::NEW_ACCOUNT_EMAIL_REGISTERED => "string", self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD => "string", self::NEW_ACCOUNT_EMAIL_CONFIRMED => "string", self::NEW_ACCOUNT_EMAIL_CONFIRMATION => "string"])] - protected function getTemplateTypes(): array + protected function getTemplateTypes() { /** * self::NEW_ACCOUNT_EMAIL_REGISTERED welcome email, when confirmation is disabled @@ -1467,20 +1366,20 @@ protected function getTemplateTypes(): array * @param string $sender configuration path of email identity * @param array $templateParams * @param int|null $storeId - * @param string|null $email + * @param string $email * @return $this - * @throws MailException|LocalizedException + * @throws MailException * @deprecated 100.1.0 * @see EmailNotification::sendEmailTemplate() */ protected function sendEmailTemplate( - CustomerInterface $customer, - string $template, - string $sender, - array $templateParams = [], - int $storeId = null, - string $email = null - ): static { + $customer, + $template, + $sender, + $templateParams = [], + $storeId = null, + $email = null + ) { $templateId = $this->scopeConfig->getValue( $template, ScopeInterface::SCOPE_STORE, @@ -1521,7 +1420,7 @@ protected function sendEmailTemplate( * @deprecated 101.0.4 * @see AccountConfirmation::isConfirmationRequired */ - protected function isConfirmationRequired(CustomerInterface $customer): bool + protected function isConfirmationRequired($customer) { return $this->accountConfirmation->isConfirmationRequired( $customer->getWebsiteId(), @@ -1538,7 +1437,7 @@ protected function isConfirmationRequired(CustomerInterface $customer): bool * @deprecated 101.0.4 * @see AccountConfirmation::isConfirmationRequired */ - protected function canSkipConfirmation(CustomerInterface $customer): bool + protected function canSkipConfirmation($customer) { if (!$customer->getId() || $customer->getEmail() === null) { return false; @@ -1562,7 +1461,7 @@ protected function canSkipConfirmation(CustomerInterface $customer): bool * @param string $rpTokenCreatedAt * @return bool */ - public function isResetPasswordLinkTokenExpired(string $rpToken, string $rpTokenCreatedAt): bool + public function isResetPasswordLinkTokenExpired($rpToken, $rpTokenCreatedAt) { if (empty($rpToken) || empty($rpTokenCreatedAt)) { return true; @@ -1628,7 +1527,7 @@ public function changeResetPasswordLinkToken(CustomerInterface $customer, string * @deprecated 100.1.0 * @see EmailNotification::passwordReminder() */ - public function sendPasswordReminderEmail(CustomerInterface $customer): static + public function sendPasswordReminderEmail($customer) { $storeId = $this->storeManager->getStore()->getId(); if (!$storeId) { @@ -1658,7 +1557,7 @@ public function sendPasswordReminderEmail(CustomerInterface $customer): static * @deprecated 100.1.0 * @see EmailNotification::passwordResetConfirmation() */ - public function sendPasswordResetConfirmationEmail(CustomerInterface $customer): static + public function sendPasswordResetConfirmationEmail($customer) { $storeId = $this->storeManager->getStore()->getId(); if (!$storeId) { @@ -1685,7 +1584,7 @@ public function sendPasswordResetConfirmationEmail(CustomerInterface $customer): * @param int $addressId * @return AddressInterface|null */ - protected function getAddressById(CustomerInterface $customer, int $addressId): ?AddressInterface + protected function getAddressById(CustomerInterface $customer, $addressId) { foreach ($customer->getAddresses() as $address) { if ($address->getId() == $addressId) { @@ -1704,7 +1603,7 @@ protected function getAddressById(CustomerInterface $customer, int $addressId): * @deprecated 100.1.0 * @see EmailNotification::getFullCustomerObject() */ - protected function getFullCustomerObject(CustomerInterface $customer): Data\CustomerSecure + protected function getFullCustomerObject($customer) { // No need to flatten the custom attributes or nested objects since the only usage is for email templates and // object passed for events @@ -1724,7 +1623,7 @@ protected function getFullCustomerObject(CustomerInterface $customer): Data\Cust * @param string $password * @return string */ - public function getPasswordHash(string $password): string + public function getPasswordHash($password) { return $this->encryptor->getHash($password, true); } @@ -1735,7 +1634,7 @@ public function getPasswordHash(string $password): string * @param CustomerInterface $customer * @throws NoSuchEntityException */ - private function disableAddressValidation(CustomerInterface $customer) + private function disableAddressValidation($customer) { foreach ($customer->getAddresses() as $address) { $addressModel = $this->addressRegistry->retrieve($address->getId()); @@ -1748,7 +1647,7 @@ private function disableAddressValidation(CustomerInterface $customer) * * @return EmailNotificationInterface */ - private function getEmailNotification(): EmailNotificationInterface + private function getEmailNotification() { if (!($this->emailNotification instanceof EmailNotificationInterface)) { return \Magento\Framework\App\ObjectManager::getInstance()->get( @@ -1765,7 +1664,7 @@ private function getEmailNotification(): EmailNotificationInterface * @param Customer $customer * @return void */ - private function setIgnoreValidationFlag(Customer $customer) + private function setIgnoreValidationFlag($customer) { $customer->setData('ignore_validation_flag', true); } @@ -1777,7 +1676,7 @@ private function setIgnoreValidationFlag(Customer $customer) * @param int|null $storeId * @return bool */ - private function isAddressAllowedForWebsite(AddressInterface $address, ?int $storeId): bool + private function isAddressAllowedForWebsite(AddressInterface $address, $storeId): bool { $allowedCountries = $this->allowedCountriesReader->getAllowedCountries(ScopeInterface::SCOPE_STORE, $storeId); From 1662192ed88a3d7107f7762f3cc2286313a7b39d Mon Sep 17 00:00:00 2001 From: Devika-GL Date: Mon, 12 Dec 2022 19:55:59 +0530 Subject: [PATCH 011/277] AC-7025 - Sanitize input handler parameter --- .../Magento/Framework/RegexValidator.php | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 lib/internal/Magento/Framework/RegexValidator.php diff --git a/lib/internal/Magento/Framework/RegexValidator.php b/lib/internal/Magento/Framework/RegexValidator.php new file mode 100644 index 0000000000000..2171b36444355 --- /dev/null +++ b/lib/internal/Magento/Framework/RegexValidator.php @@ -0,0 +1,53 @@ +regexValidatorFactory = $regexValidatorFactory + ?: ObjectManager::getInstance()->get(RegexFactory::class); + } + + /** + * Validates parameter regex + * + * @param string $params + * @param string $pattern + * @return bool + */ + public function validateParamRegex($params, $pattern = self::VALIDATION_RULE_PATTERN) + { + $validator = $this->regexValidatorFactory->create(['pattern' => $pattern]); + + if ($params && !$validator->isValid($params)) { + return false; + } + + return true; + } +} From 138ca0b85730684020d391327cf2800c030bd116 Mon Sep 17 00:00:00 2001 From: Devika-GL Date: Mon, 12 Dec 2022 20:00:58 +0530 Subject: [PATCH 012/277] AC-7025 - Sanitize input handler parameter --- .../Adminhtml/Product/NewAction.php | 25 +++++- .../Adminhtml/Product/NewActionTest.php | 90 ++++++++++++++++--- app/code/Magento/Catalog/i18n/en_US.csv | 1 + .../Adminhtml/Order/Create/LoadBlock.php | 38 ++++++-- 4 files changed, 130 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php index 0b1ef98c386c4..bf34c5ebc5b98 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php @@ -4,18 +4,21 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Catalog\Controller\Adminhtml\Product; -use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface; -use Magento\Backend\App\Action; use Magento\Catalog\Controller\Adminhtml\Product; +use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface; use Magento\Framework\App\ObjectManager; +use Magento\Framework\RegexValidator; class NewAction extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpGetActionInterface { /** * @var Initialization\StockDataFilter * @deprecated 101.0.0 + * @see Initialization\StockDataFilter */ protected $stockFilter; @@ -30,23 +33,32 @@ class NewAction extends \Magento\Catalog\Controller\Adminhtml\Product implements protected $resultForwardFactory; /** - * @param Action\Context $context + * @var RegexValidator + */ + public RegexValidator $regexValidator; + + /** + * @param Context $context * @param Builder $productBuilder * @param Initialization\StockDataFilter $stockFilter * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory + * @param RegexValidator|null $regexValidator */ public function __construct( \Magento\Backend\App\Action\Context $context, Product\Builder $productBuilder, Initialization\StockDataFilter $stockFilter, \Magento\Framework\View\Result\PageFactory $resultPageFactory, - \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory + \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory, + RegexValidator $regexValidator = null ) { $this->stockFilter = $stockFilter; parent::__construct($context, $productBuilder); $this->resultPageFactory = $resultPageFactory; $this->resultForwardFactory = $resultForwardFactory; + $this->regexValidator = $regexValidator + ?: ObjectManager::getInstance()->get(RegexValidator::class); } /** @@ -56,6 +68,11 @@ public function __construct( */ public function execute() { + $typeId = $this->getRequest()->getParam('type'); + if (!$this->regexValidator->validateParamRegex($typeId)) { + return $this->resultForwardFactory->create()->forward('noroute'); + } + if (!$this->getRequest()->getParam('set')) { return $this->resultForwardFactory->create()->forward('noroute'); } diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php index 974c85b2b5c98..8a041516011b2 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php @@ -16,6 +16,9 @@ use Magento\Catalog\Controller\Adminhtml\Product\NewAction; use Magento\Catalog\Model\Product; use Magento\Catalog\Test\Unit\Controller\Adminhtml\ProductTest; +use Magento\Framework\RegexValidator; +use Magento\Framework\Validator\Regex; +use Magento\Framework\Validator\RegexFactory; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\View\Result\PageFactory; use PHPUnit\Framework\MockObject\MockObject; @@ -42,6 +45,26 @@ class NewActionTest extends ProductTest */ protected $initializationHelper; + /** + * @var RegexValidator|MockObject + */ + protected $regexValidator; + + /** + * @var RegexFactory + */ + private $regexValidatorFactoryMock; + + /** + * @var Regex|MockObject + */ + private $regexValidatorMock; + + /** + * @var ForwardFactory&MockObject|MockObject + */ + private $resultForwardFactory; + protected function setUp(): void { $this->productBuilder = $this->createPartialMock( @@ -63,37 +86,78 @@ protected function setUp(): void ->disableOriginalConstructor() ->setMethods(['create']) ->getMock(); - $resultPageFactory->expects($this->atLeastOnce()) - ->method('create') - ->willReturn($this->resultPage); $this->resultForward = $this->getMockBuilder(Forward::class) ->disableOriginalConstructor() ->getMock(); - $resultForwardFactory = $this->getMockBuilder(ForwardFactory::class) + $this->resultForwardFactory = $this->getMockBuilder(ForwardFactory::class) + ->disableOriginalConstructor() + ->onlyMethods(['create']) + ->getMock(); + + $this->regexValidatorFactoryMock = $this->getMockBuilder(RegexFactory::class) ->disableOriginalConstructor() ->setMethods(['create']) ->getMock(); - $resultForwardFactory->expects($this->any()) - ->method('create') - ->willReturn($this->resultForward); + $this->regexValidatorMock = $this->createMock(Regex::class); + $this->regexValidatorFactoryMock->method('create') + ->willReturn($this->regexValidatorMock); + $this->regexValidator = new regexValidator($this->regexValidatorFactoryMock); $this->action = (new ObjectManager($this))->getObject( NewAction::class, [ 'context' => $this->initContext(), 'productBuilder' => $this->productBuilder, 'resultPageFactory' => $resultPageFactory, - 'resultForwardFactory' => $resultForwardFactory, + 'resultForwardFactory' => $this->resultForwardFactory, + 'regexValidator' => $this->regexValidator, ] ); } - public function testExecute() + /** + * Test execute method input validation. + * + * @param string $value + * @param bool $exceptionThrown + * @dataProvider validationCases + */ + public function testExecute(string $value, bool $exceptionThrown): void + { + if ($exceptionThrown) { + $this->action->getRequest()->expects($this->any()) + ->method('getParam') + ->willReturn($value); + $this->resultForwardFactory->expects($this->any()) + ->method('create') + ->willReturn($this->resultForward); + $this->resultForward->expects($this->once()) + ->method('forward') + ->with('noroute') + ->willReturn(true); + $this->assertTrue($this->action->execute()); + } else { + $this->action->getRequest()->expects($this->any())->method('getParam')->willReturn($value); + $this->regexValidatorMock->expects($this->any()) + ->method('isValid') + ->with($value) + ->willReturn(true); + + $this->assertEquals(true, $this->action->regexValidator->validateParamRegex($value)); + } + } + + /** + * Validation cases. + * + * @return array + */ + public function validationCases(): array { - $this->action->getRequest()->expects($this->any())->method('getParam')->willReturn(true); - $this->action->getRequest()->expects($this->any())->method('getFullActionName') - ->willReturn('catalog_product_new'); - $this->action->execute(); + return [ + 'execute-with-exception' => ['simple\' and true()]|*[self%3a%3ahandle%20or%20self%3a%3alayout',true], + 'execute-without-exception' => ['catalog_product_new',false] + ]; } } diff --git a/app/code/Magento/Catalog/i18n/en_US.csv b/app/code/Magento/Catalog/i18n/en_US.csv index a5b2944a45fa2..73d17d52a764c 100644 --- a/app/code/Magento/Catalog/i18n/en_US.csv +++ b/app/code/Magento/Catalog/i18n/en_US.csv @@ -818,4 +818,5 @@ Details,Details "Failed to retrieve product links for ""%1""","Failed to retrieve product links for ""%1""" "The linked product SKU is invalid. Verify the data and try again.","The linked product SKU is invalid. Verify the data and try again." "The linked products data is invalid. Verify the data and try again.","The linked products data is invalid. Verify the data and try again." +"The url has invalid characters. Please correct and try again.","The url has invalid characters. Please correct and try again." diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/LoadBlock.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/LoadBlock.php index 65ccb43879ac6..643ed5445231f 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/LoadBlock.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/LoadBlock.php @@ -3,18 +3,26 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Sales\Controller\Adminhtml\Order\Create; -use Magento\Framework\App\Action\HttpGetActionInterface; -use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Backend\App\Action; +use Magento\Backend\App\Action\Context; use Magento\Backend\Model\View\Result\ForwardFactory; -use Magento\Framework\View\Result\PageFactory; +use Magento\Framework\App\Action\HttpGetActionInterface; +use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\Result\RawFactory; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\RegexValidator; +use Magento\Framework\View\Result\PageFactory; use Magento\Sales\Controller\Adminhtml\Order\Create as CreateAction; use Magento\Store\Model\StoreManagerInterface; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class LoadBlock extends CreateAction implements HttpPostActionInterface, HttpGetActionInterface { /** @@ -28,13 +36,19 @@ class LoadBlock extends CreateAction implements HttpPostActionInterface, HttpGet private $storeManager; /** - * @param Action\Context $context - * @param \Magento\Catalog\Helper\Product $productHelper - * @param \Magento\Framework\Escaper $escaper + * @var RegexValidator + */ + private RegexValidator $regexValidator; + + /** + * @param Context $context + * @param Product $productHelper + * @param Escaper $escaper * @param PageFactory $resultPageFactory * @param ForwardFactory $resultForwardFactory * @param RawFactory $resultRawFactory * @param StoreManagerInterface|null $storeManager + * @param RegexValidator|null $regexValidator */ public function __construct( Action\Context $context, @@ -43,7 +57,8 @@ public function __construct( PageFactory $resultPageFactory, ForwardFactory $resultForwardFactory, RawFactory $resultRawFactory, - StoreManagerInterface $storeManager = null + StoreManagerInterface $storeManager = null, + RegexValidator $regexValidator = null ) { $this->resultRawFactory = $resultRawFactory; parent::__construct( @@ -55,6 +70,8 @@ public function __construct( ); $this->storeManager = $storeManager ?: ObjectManager::getInstance() ->get(StoreManagerInterface::class); + $this->regexValidator = $regexValidator + ?: ObjectManager::getInstance()->get(RegexValidator::class); } /** @@ -64,6 +81,7 @@ public function __construct( * * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) + * @throws LocalizedException */ public function execute() { @@ -84,6 +102,12 @@ public function execute() $asJson = $request->getParam('json'); $block = $request->getParam('block'); + if ($block && !$this->regexValidator->validateParamRegex($block)) { + throw new LocalizedException( + __('The url has invalid characters. Please correct and try again.') + ); + } + /** @var \Magento\Framework\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); if ($asJson) { From 6bda8e49657d08ce74d6f280257d26ffa13a27e7 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Mon, 12 Dec 2022 21:53:28 +0530 Subject: [PATCH 013/277] AC-6695: Guest Checkout Fix --- .../Magento/Customer/Api/AccountManagementInterface.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index ae70d313e211e..9c607be9f217c 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -36,8 +36,8 @@ interface AccountManagementInterface */ public function createAccount( \Magento\Customer\Api\Data\CustomerInterface $customer, - $password = null, - $redirectUrl = '' + $password = null, + $redirectUrl = '' ); /** @@ -54,8 +54,8 @@ public function createAccount( */ public function createAccountWithPasswordHash( \Magento\Customer\Api\Data\CustomerInterface $customer, - $hash, - $redirectUrl = '' + $hash, + $redirectUrl = '' ); /** From 8929886968c2f3a6c7c90c737e417208c3c4cf99 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Tue, 13 Dec 2022 12:02:36 +0530 Subject: [PATCH 014/277] AC-6695: Guest Checkout Fix --- app/code/Magento/Customer/Model/AccountManagement.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index ee114bb284617..6361abc32fa7b 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -69,6 +69,9 @@ */ class AccountManagement implements AccountManagementInterface { + /** + * System Configuration Path for Enable/Disable Login at Guest Checkout + */ private const GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG = 'checkout/options/disable_guest_checkout_login'; /** From d7b382dedaa194fdb5037593776aaf3434c25108 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Tue, 13 Dec 2022 12:04:48 +0530 Subject: [PATCH 015/277] AC-6695: Guest Checkout Fix --- .../Api/AccountManagementInterface.php | 41 ++++++++++--------- .../Customer/Model/AccountManagement.php | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index 9c607be9f217c..75efce04a3791 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -8,6 +8,7 @@ namespace Magento\Customer\Api; use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; /** * Interface for managing customers accounts. @@ -32,7 +33,7 @@ interface AccountManagementInterface * @param string $password * @param string $redirectUrl * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function createAccount( \Magento\Customer\Api\Data\CustomerInterface $customer, @@ -50,7 +51,7 @@ public function createAccount( * @return \Magento\Customer\Api\Data\CustomerInterface * @throws \Magento\Framework\Exception\InputException If bad input is provided * @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function createAccountWithPasswordHash( \Magento\Customer\Api\Data\CustomerInterface $customer, @@ -63,7 +64,7 @@ public function createAccountWithPasswordHash( * * @param \Magento\Customer\Api\Data\CustomerInterface $customer * @return \Magento\Customer\Api\Data\ValidationResultsInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer); @@ -73,7 +74,7 @@ public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer) * @param int $customerId * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function isReadonly($customerId); @@ -83,7 +84,7 @@ public function isReadonly($customerId); * @param string $email * @param string $confirmationKey * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function activate($email, $confirmationKey); @@ -93,7 +94,7 @@ public function activate($email, $confirmationKey); * @param int $customerId * @param string $confirmationKey * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function activateById($customerId, $confirmationKey); @@ -103,7 +104,7 @@ public function activateById($customerId, $confirmationKey); * @param string $email * @param string $password * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function authenticate($email, $password); @@ -114,7 +115,7 @@ public function authenticate($email, $password); * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function changePassword($email, $currentPassword, $newPassword); @@ -125,7 +126,7 @@ public function changePassword($email, $currentPassword, $newPassword); * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function changePasswordById($customerId, $currentPassword, $newPassword); @@ -136,7 +137,7 @@ public function changePasswordById($customerId, $currentPassword, $newPassword); * @param string $template * @param int $websiteId * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function initiatePasswordReset($email, $template, $websiteId = null); @@ -149,7 +150,7 @@ public function initiatePasswordReset($email, $template, $websiteId = null); * @param string $newPassword * * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException * @throws InputException */ public function resetPassword($email, $resetToken, $newPassword); @@ -166,7 +167,7 @@ public function resetPassword($email, $resetToken, $newPassword); * @throws \Magento\Framework\Exception\State\ExpiredException If token is expired * @throws \Magento\Framework\Exception\InputException If token or customer id is invalid * @throws \Magento\Framework\Exception\NoSuchEntityException If customer doesn't exist - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); @@ -175,7 +176,7 @@ public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkTo * * @param int $customerId * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function getConfirmationStatus($customerId); @@ -186,7 +187,7 @@ public function getConfirmationStatus($customerId); * @param int $websiteId * @param string $redirectUrl * @return bool true on success - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function resendConfirmation($email, $websiteId, $redirectUrl = ''); @@ -194,11 +195,11 @@ public function resendConfirmation($email, $websiteId, $redirectUrl = ''); * Check if given email is associated with a customer account in given website. * * @param string $customerEmail - * @param int $websiteId If not set, will use the current websiteId + * @param int|null $websiteId If not set, will use the current websiteId * @return bool - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - public function isEmailAvailable($customerEmail, $websiteId = null); + public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool; /** * Check store availability for customer given the customerId. @@ -206,7 +207,7 @@ public function isEmailAvailable($customerEmail, $websiteId = null); * @param int $customerWebsiteId * @param int $storeId * @return bool - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function isCustomerInStore($customerWebsiteId, $storeId); @@ -216,7 +217,7 @@ public function isCustomerInStore($customerWebsiteId, $storeId); * @param int $customerId * @return \Magento\Customer\Api\Data\AddressInterface * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function getDefaultBillingAddress($customerId); @@ -226,7 +227,7 @@ public function getDefaultBillingAddress($customerId); * @param int $customerId * @return \Magento\Customer\Api\Data\AddressInterface * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function getDefaultShippingAddress($customerId); diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 6361abc32fa7b..da4d9d662954a 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -1143,7 +1143,7 @@ public function validate(CustomerInterface $customer) /** * @inheritdoc */ - public function isEmailAvailable($customerEmail, $websiteId = null) + public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool { $guestLoginConfig = $this->scopeConfig->getValue( self::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, From cf06313753e69b349e0a40bb2dcc7b3845f455be Mon Sep 17 00:00:00 2001 From: Devika-GL Date: Tue, 13 Dec 2022 12:20:31 +0530 Subject: [PATCH 016/277] AC-7025 - Sanitize input handler parameter --- .../Magento/Catalog/Controller/Adminhtml/Product/NewAction.php | 2 +- .../Test/Unit/Controller/Adminhtml/Product/NewActionTest.php | 2 +- lib/internal/Magento/Framework/RegexValidator.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php index bf34c5ebc5b98..ea14dbc1ce627 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php @@ -35,7 +35,7 @@ class NewAction extends \Magento\Catalog\Controller\Adminhtml\Product implements /** * @var RegexValidator */ - public RegexValidator $regexValidator; + private RegexValidator $regexValidator; /** * @param Context $context diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php index 8a041516011b2..90ab6d86abb3b 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php @@ -144,7 +144,7 @@ public function testExecute(string $value, bool $exceptionThrown): void ->with($value) ->willReturn(true); - $this->assertEquals(true, $this->action->regexValidator->validateParamRegex($value)); + $this->assertEquals(true, $this->regexValidator->validateParamRegex($value)); } } diff --git a/lib/internal/Magento/Framework/RegexValidator.php b/lib/internal/Magento/Framework/RegexValidator.php index 2171b36444355..77274f0f52247 100644 --- a/lib/internal/Magento/Framework/RegexValidator.php +++ b/lib/internal/Magento/Framework/RegexValidator.php @@ -40,7 +40,7 @@ public function __construct( * @param string $pattern * @return bool */ - public function validateParamRegex($params, $pattern = self::VALIDATION_RULE_PATTERN) + public function validateParamRegex(string $params, string $pattern = self::VALIDATION_RULE_PATTERN): bool { $validator = $this->regexValidatorFactory->create(['pattern' => $pattern]); From 185a0eaf1c5da129eb5e0676a7dc19637471b4bb Mon Sep 17 00:00:00 2001 From: Devika-GL Date: Wed, 14 Dec 2022 11:12:49 +0530 Subject: [PATCH 017/277] AC-7025 - Sanitize input handler parameter --- .../Test/Unit/Controller/Adminhtml/Product/NewActionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php old mode 100644 new mode 100755 index 90ab6d86abb3b..cad43f39f0261 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/NewActionTest.php @@ -48,7 +48,7 @@ class NewActionTest extends ProductTest /** * @var RegexValidator|MockObject */ - protected $regexValidator; + private $regexValidator; /** * @var RegexFactory From f59a2fdea0c4188ced2b6bd655a072fb37e8121f Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 15 Dec 2022 17:32:03 +0530 Subject: [PATCH 018/277] AC-6695: Guest Checkout Fix --- app/code/Magento/Checkout/etc/adminhtml/system.xml | 4 ++-- app/code/Magento/Customer/Model/AccountManagement.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index 14278a34723a9..ae5a660ccbe7a 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -13,8 +13,8 @@ Magento_Checkout::checkout - - + + Magento\Config\Model\Config\Source\Yesno diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index da4d9d662954a..0b392c2f5cd12 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -1151,7 +1151,7 @@ public function isEmailAvailable(string $customerEmail, int $websiteId = null): $websiteId ); - if ($guestLoginConfig) { + if (!$guestLoginConfig) { return true; } From 0d8eab69e9d67c46866d7b0b9f87634142c27bac Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 15 Dec 2022 18:31:16 +0530 Subject: [PATCH 019/277] AC-6695: Guest Checkout Fix --- .../Customer/Model/AccountManagement.php | 80 ++++++++++--------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 0b392c2f5cd12..062641ffe266a 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -20,6 +20,7 @@ use Magento\Customer\Model\Customer as CustomerModel; use Magento\Customer\Model\Customer\CredentialsValidator; use Magento\Customer\Model\ForgotPasswordToken\GetCustomerByToken; +use Magento\Customer\Model\Logger as CustomerLogger; use Magento\Customer\Model\Metadata\Validator; use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory; use Magento\Directory\Model\AllowedCountries; @@ -57,7 +58,6 @@ use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; use Psr\Log\LoggerInterface as PsrLogger; -use Magento\Customer\Model\Logger as CustomerLogger; /** * Handle various customer account actions @@ -72,7 +72,7 @@ class AccountManagement implements AccountManagementInterface /** * System Configuration Path for Enable/Disable Login at Guest Checkout */ - private const GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG = 'checkout/options/disable_guest_checkout_login'; + private const GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG = 'checkout/options/enable_guest_checkout_login'; /** * Configuration paths for create account email template @@ -223,177 +223,177 @@ class AccountManagement implements AccountManagementInterface /** * @var CustomerFactory */ - private $customerFactory; + private CustomerFactory $customerFactory; /** * @var ValidationResultsInterfaceFactory */ - private $validationResultsDataFactory; + private ValidationResultsInterfaceFactory $validationResultsDataFactory; /** * @var ManagerInterface */ - private $eventManager; + private ManagerInterface $eventManager; /** * @var StoreManagerInterface */ - private $storeManager; + private StoreManagerInterface $storeManager; /** * @var Random */ - private $mathRandom; + private Random $mathRandom; /** * @var Validator */ - private $validator; + private Validator $validator; /** * @var AddressRepositoryInterface */ - private $addressRepository; + private AddressRepositoryInterface $addressRepository; /** * @var CustomerMetadataInterface */ - private $customerMetadataService; + private CustomerMetadataInterface $customerMetadataService; /** * @var PsrLogger */ - protected $logger; + protected PsrLogger $logger; /** * @var Encryptor */ - private $encryptor; + private Encryptor $encryptor; /** * @var CustomerRegistry */ - private $customerRegistry; + private CustomerRegistry $customerRegistry; /** * @var ConfigShare */ - private $configShare; + private ConfigShare $configShare; /** * @var StringHelper */ - protected $stringHelper; + protected StringHelper $stringHelper; /** * @var CustomerRepositoryInterface */ - private $customerRepository; + private CustomerRepositoryInterface $customerRepository; /** * @var ScopeConfigInterface */ - private $scopeConfig; + private ScopeConfigInterface $scopeConfig; /** * @var TransportBuilder */ - private $transportBuilder; + private TransportBuilder $transportBuilder; /** * @var DataObjectProcessor */ - protected $dataProcessor; + protected DataObjectProcessor $dataProcessor; /** * @var Registry */ - protected $registry; + protected Registry $registry; /** * @var CustomerViewHelper */ - protected $customerViewHelper; + protected CustomerViewHelper $customerViewHelper; /** * @var DateTime */ - protected $dateTime; + protected DateTime $dateTime; /** * @var ObjectFactory */ - protected $objectFactory; + protected ObjectFactory $objectFactory; /** * @var ExtensibleDataObjectConverter */ - protected $extensibleDataObjectConverter; + protected ExtensibleDataObjectConverter $extensibleDataObjectConverter; /** * @var CustomerModel */ - protected $customerModel; + protected CustomerModel $customerModel; /** * @var AuthenticationInterface */ - protected $authentication; + protected AuthenticationInterface $authentication; /** * @var EmailNotificationInterface */ - private $emailNotification; + private EmailNotificationInterface $emailNotification; /** * @var Backend */ - private $eavValidator; + private Backend $eavValidator; /** * @var CredentialsValidator */ - private $credentialsValidator; + private CredentialsValidator $credentialsValidator; /** * @var DateTimeFactory */ - private $dateTimeFactory; + private DateTimeFactory $dateTimeFactory; /** * @var AccountConfirmation */ - private $accountConfirmation; + private AccountConfirmation $accountConfirmation; /** * @var SearchCriteriaBuilder */ - private $searchCriteriaBuilder; + private SearchCriteriaBuilder $searchCriteriaBuilder; /** * @var AddressRegistry */ - private $addressRegistry; + private AddressRegistry $addressRegistry; /** * @var AllowedCountries */ - private $allowedCountriesReader; + private AllowedCountries $allowedCountriesReader; /** * @var GetCustomerByToken */ - private $getByToken; + private GetCustomerByToken $getByToken; /** * @var SessionCleanerInterface */ - private $sessionCleaner; + private SessionCleanerInterface $sessionCleaner; /** * @var AuthorizationInterface */ - private $authorization; + private AuthorizationInterface $authorization; /** * @var CustomerLogger @@ -1142,6 +1142,10 @@ public function validate(CustomerInterface $customer) /** * @inheritdoc + * + * @param string $customerEmail + * @param int $websiteId + * @return bool */ public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool { @@ -1151,7 +1155,7 @@ public function isEmailAvailable(string $customerEmail, int $websiteId = null): $websiteId ); - if (!$guestLoginConfig) { + if ($guestLoginConfig === null || $guestLoginConfig === false) { return true; } From a05c5287f47b5f99e203fc375f17d9621ce05804 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 15 Dec 2022 19:11:41 +0530 Subject: [PATCH 020/277] AC-6695: Guest Checkout Fix --- app/code/Magento/Customer/Model/AccountManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 062641ffe266a..49d25fc77365c 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -1144,7 +1144,7 @@ public function validate(CustomerInterface $customer) * @inheritdoc * * @param string $customerEmail - * @param int $websiteId + * @param int|null $websiteId * @return bool */ public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool From e102b6e159c94d98c2c30193687479303f058684 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 15 Dec 2022 19:33:03 +0530 Subject: [PATCH 021/277] AC-6695: Guest Checkout Fix --- app/code/Magento/Checkout/etc/config.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/etc/config.xml b/app/code/Magento/Checkout/etc/config.xml index eac0bd849da35..c85d68b35f714 100644 --- a/app/code/Magento/Checkout/etc/config.xml +++ b/app/code/Magento/Checkout/etc/config.xml @@ -9,6 +9,7 @@ + 0 1 1 0 From 2c03260a198370331d75bb926fc45f0cd77974f9 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Fri, 21 Oct 2022 19:06:24 +0530 Subject: [PATCH 022/277] AC-6731: Validation fixes for WebAPI --- .../Quote/Model/BillingAddressManagement.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index 6f8a44dff464c..bb0e0a3d9d5cd 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -6,11 +6,11 @@ namespace Magento\Quote\Model; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\InputException; -use Magento\Quote\Model\Quote\Address\BillingAddressPersister; -use Psr\Log\LoggerInterface as Logger; use Magento\Quote\Api\BillingAddressManagementInterface; -use Magento\Framework\App\ObjectManager; +use Magento\Quote\Api\Data\AddressInterface; +use Psr\Log\LoggerInterface as Logger; /** * Quote billing address write service object. @@ -72,10 +72,18 @@ public function __construct( * @inheritdoc * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address, $useForShipping = false) + public function assign($cartId, AddressInterface $address, $useForShipping = false) { /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); + + // reset the address id, if it doesn't belong to quote. + $old = $quote->getAddressesCollection()->getItemById($address->getId()) + ?? $quote->getBillingAddress(); + if ($old !== null) { + $address->setId($old->getId()); + } + $address->setCustomerId($quote->getCustomerId()); $quote->removeAddress($quote->getBillingAddress()->getId()); $quote->setBillingAddress($address); From ae8d9a6311333aea8856ea8fba1f1852e0ac4c60 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Tue, 25 Oct 2022 14:43:25 +0530 Subject: [PATCH 023/277] AC-6731 : Validation fixes for webAPI --- .../Quote/Model/BillingAddressManagement.php | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index bb0e0a3d9d5cd..91755a85d7911 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -8,8 +8,10 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Api\BillingAddressManagementInterface; use Magento\Quote\Api\Data\AddressInterface; +use Magento\Quote\Api\Data\CartInterface; use Psr\Log\LoggerInterface as Logger; /** @@ -77,12 +79,8 @@ public function assign($cartId, AddressInterface $address, $useForShipping = fal /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); - // reset the address id, if it doesn't belong to quote. - $old = $quote->getAddressesCollection()->getItemById($address->getId()) - ?? $quote->getBillingAddress(); - if ($old !== null) { - $address->setId($old->getId()); - } + // validate the address + $this->validateAddress($quote, $address); $address->setCustomerId($quote->getCustomerId()); $quote->removeAddress($quote->getBillingAddress()->getId()); @@ -121,4 +119,24 @@ private function getShippingAddressAssignment() } return $this->shippingAddressAssignment; } + + /** + * Validate address to be used for cart. + * + * @param CartInterface $cart + * @param AddressInterface $address + * @return void + * @throws InputException The specified address belongs to another customer. + * @throws NoSuchEntityException The specified customer ID or address ID is not valid. + */ + public function validateAddress(CartInterface $cart, AddressInterface $address): void + { + // check if address belongs to quote. + if ($address->getId() !== null) { + $old = $cart->getAddressesCollection()->getItemById($address->getId()); + if ($old === null) { + throw new InputException(__('Invalid address')); + } + } + } } From a5e087c8ee66b27383fd85e12e2b54bbf60e6f96 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Wed, 26 Oct 2022 12:33:35 +0530 Subject: [PATCH 024/277] AC-6731: Validation fixes for WebAPI --- app/code/Magento/Quote/Model/BillingAddressManagement.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index 91755a85d7911..991485e569879 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -8,7 +8,6 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Api\BillingAddressManagementInterface; use Magento\Quote\Api\Data\AddressInterface; use Magento\Quote\Api\Data\CartInterface; @@ -127,7 +126,6 @@ private function getShippingAddressAssignment() * @param AddressInterface $address * @return void * @throws InputException The specified address belongs to another customer. - * @throws NoSuchEntityException The specified customer ID or address ID is not valid. */ public function validateAddress(CartInterface $cart, AddressInterface $address): void { From 556666da9a09dc6cae7b3eeb7d95e35a07e10c59 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Fri, 28 Oct 2022 10:52:18 +0530 Subject: [PATCH 025/277] AC-6731: Validation fixes for WebAPI --- .../Quote/Model/BillingAddressManagement.php | 22 +----------- .../Quote/Model/QuoteAddressValidator.php | 35 +++++++++++++++---- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index 991485e569879..c7f9512fc1097 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -10,7 +10,6 @@ use Magento\Framework\Exception\InputException; use Magento\Quote\Api\BillingAddressManagementInterface; use Magento\Quote\Api\Data\AddressInterface; -use Magento\Quote\Api\Data\CartInterface; use Psr\Log\LoggerInterface as Logger; /** @@ -79,7 +78,7 @@ public function assign($cartId, AddressInterface $address, $useForShipping = fal $quote = $this->quoteRepository->getActive($cartId); // validate the address - $this->validateAddress($quote, $address); + $this->addressValidator->validateAddress($quote, $address); $address->setCustomerId($quote->getCustomerId()); $quote->removeAddress($quote->getBillingAddress()->getId()); @@ -118,23 +117,4 @@ private function getShippingAddressAssignment() } return $this->shippingAddressAssignment; } - - /** - * Validate address to be used for cart. - * - * @param CartInterface $cart - * @param AddressInterface $address - * @return void - * @throws InputException The specified address belongs to another customer. - */ - public function validateAddress(CartInterface $cart, AddressInterface $address): void - { - // check if address belongs to quote. - if ($address->getId() !== null) { - $old = $cart->getAddressesCollection()->getItemById($address->getId()); - if ($old === null) { - throw new InputException(__('Invalid address')); - } - } - } } diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index f0bc12f7b3a36..6b14092a97b50 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -59,7 +59,7 @@ public function __construct( * @param int|null $customerId Cart belongs to * @return void * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. + * @throws NoSuchEntityException The specified customer ID or address ID is not valid. */ private function doValidate(AddressInterface $address, ?int $customerId): void { @@ -67,7 +67,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void if ($customerId) { $customer = $this->customerRepository->getById($customerId); if (!$customer->getId()) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid customer id %1', $customerId) ); } @@ -76,7 +76,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void if ($address->getCustomerAddressId()) { //Existing address cannot belong to a guest if (!$customerId) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid customer address id %1', $address->getCustomerAddressId()) ); } @@ -84,7 +84,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void try { $this->addressRepository->getById($address->getCustomerAddressId()); } catch (NoSuchEntityException $e) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid address id %1', $address->getId()) ); } @@ -94,7 +94,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void return $address->getId(); }, $this->customerRepository->getById($customerId)->getAddresses()); if (!in_array($address->getCustomerAddressId(), $applicableAddressIds)) { - throw new \Magento\Framework\Exception\NoSuchEntityException( + throw new NoSuchEntityException( __('Invalid customer address id %1', $address->getCustomerAddressId()) ); } @@ -107,7 +107,7 @@ private function doValidate(AddressInterface $address, ?int $customerId): void * @param \Magento\Quote\Api\Data\AddressInterface $addressData The address data object. * @return bool * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. + * @throws NoSuchEntityException The specified customer ID or address ID is not valid. */ public function validate(AddressInterface $addressData) { @@ -123,10 +123,31 @@ public function validate(AddressInterface $addressData) * @param AddressInterface $address * @return void * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer. - * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid. + * @throws NoSuchEntityException The specified customer ID or address ID is not valid. */ public function validateForCart(CartInterface $cart, AddressInterface $address): void { $this->doValidate($address, $cart->getCustomerIsGuest() ? null : $cart->getCustomer()->getId()); } + + /** + * Validate address id to be used for cart. + * + * @param CartInterface $cart + * @param AddressInterface $address + * @return void + * @throws NoSuchEntityException The specified customer ID or address ID is not valid. + */ + public function validateAddress(CartInterface $cart, AddressInterface $address): void + { + // check if address belongs to quote. + if ($address->getId() !== null) { + $old = $cart->getAddressesCollection()->getItemById($address->getId()); + if ($old === null) { + throw new NoSuchEntityException( + __('Invalid quote address id %1', $address->getId()) + ); + } + } + } } From a4d941588f0e3034733ffe1975873e6d81312e27 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Wed, 2 Nov 2022 17:52:48 +0530 Subject: [PATCH 026/277] AC-6731: Validation fixes for webAPI --- app/code/Magento/Quote/Model/BillingAddressManagement.php | 1 + app/code/Magento/Quote/Model/QuoteAddressValidator.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index c7f9512fc1097..1f8528970c17b 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Quote\Model; diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index 6b14092a97b50..ed64f52821dae 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Quote\Model; use Magento\Framework\Exception\NoSuchEntityException; From 58d2c66daed92a42e94bbdd9115215c34e182b26 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Thu, 3 Nov 2022 16:32:26 +0530 Subject: [PATCH 027/277] AC-6731: Validation fixes for webAPI --- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index ed64f52821dae..6b14092a97b50 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -3,8 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -declare(strict_types=1); - namespace Magento\Quote\Model; use Magento\Framework\Exception\NoSuchEntityException; From 016e76cdb332217e698ddbe2d6dee904dd12d640 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Thu, 3 Nov 2022 16:43:24 +0530 Subject: [PATCH 028/277] AC-6731: Validation fixes for webAPI --- app/code/Magento/Quote/Model/BillingAddressManagement.php | 4 ++-- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index 1f8528970c17b..0532eed009051 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -26,14 +26,14 @@ class BillingAddressManagement implements BillingAddressManagementInterface protected $addressValidator; /** - * Logger. + * Logger object. * * @var Logger */ protected $logger; /** - * Quote repository. + * Quote repository object. * * @var \Magento\Quote\Api\CartRepositoryInterface */ diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index 6b14092a97b50..a241337473231 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -24,7 +24,7 @@ class QuoteAddressValidator protected $addressRepository; /** - * Customer repository. + * Customer repository object. * * @var \Magento\Customer\Api\CustomerRepositoryInterface */ @@ -32,6 +32,8 @@ class QuoteAddressValidator /** * @deprecated 101.1.1 This class is not a part of HTML presentation layer and should not use sessions. + * + * @var \Magento\Customer\Model\Session */ protected $customerSession; From 6eb356f681a14a8bd63542358ec37ad3aa05f5f5 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Fri, 4 Nov 2022 11:25:56 +0530 Subject: [PATCH 029/277] AC-6731: Validation fixes for webAPI --- app/code/Magento/Quote/Model/BillingAddressManagement.php | 2 +- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index 0532eed009051..93185227b080a 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -79,7 +79,7 @@ public function assign($cartId, AddressInterface $address, $useForShipping = fal $quote = $this->quoteRepository->getActive($cartId); // validate the address - $this->addressValidator->validateAddress($quote, $address); + $this->addressValidator->validateWithExistingAddress($quote, $address); $address->setCustomerId($quote->getCustomerId()); $quote->removeAddress($quote->getBillingAddress()->getId()); diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index a241337473231..379d083a2feb1 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -140,7 +140,7 @@ public function validateForCart(CartInterface $cart, AddressInterface $address): * @return void * @throws NoSuchEntityException The specified customer ID or address ID is not valid. */ - public function validateAddress(CartInterface $cart, AddressInterface $address): void + public function validateWithExistingAddress(CartInterface $cart, AddressInterface $address): void { // check if address belongs to quote. if ($address->getId() !== null) { From 9701133ec9bdfb920750b43f946432777c4e4979 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Mon, 7 Nov 2022 11:25:39 +0530 Subject: [PATCH 030/277] AC-6731: Validation fixes for webAPI --- app/code/Magento/Quote/i18n/en_US.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/i18n/en_US.csv b/app/code/Magento/Quote/i18n/en_US.csv index d96c88b7795f7..c8da332f729c8 100644 --- a/app/code/Magento/Quote/i18n/en_US.csv +++ b/app/code/Magento/Quote/i18n/en_US.csv @@ -69,3 +69,4 @@ Carts,Carts "Validated Country Code","Validated Country Code" "Validated Vat Number","Validated Vat Number" "Invalid Quote Item id %1","Invalid Quote Item id %1" +"Invalid quote address id %1","Invalid quote address id %1" From d0d67d472fa7aadcb593c553a6707fbec2d9ed5c Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Tue, 10 Jan 2023 22:36:44 +0530 Subject: [PATCH 031/277] AC-6695: Guest Checkout Fix --- .../Api/AccountManagementInterface.php | 34 +++++++++--------- .../Customer/Model/AccountManagement.php | 2 +- .../Customer/Api/AccountManagementTest.php | 34 ++++++++++++++---- .../GraphQl/Customer/IsEmailAvailableTest.php | 35 ++++++++++++++++++- .../Customer/Model/AccountManagementTest.php | 28 +++++++++++++-- 5 files changed, 106 insertions(+), 27 deletions(-) diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index 75efce04a3791..3dc560c8c23a3 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -33,7 +33,7 @@ interface AccountManagementInterface * @param string $password * @param string $redirectUrl * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function createAccount( \Magento\Customer\Api\Data\CustomerInterface $customer, @@ -51,7 +51,7 @@ public function createAccount( * @return \Magento\Customer\Api\Data\CustomerInterface * @throws \Magento\Framework\Exception\InputException If bad input is provided * @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function createAccountWithPasswordHash( \Magento\Customer\Api\Data\CustomerInterface $customer, @@ -64,7 +64,7 @@ public function createAccountWithPasswordHash( * * @param \Magento\Customer\Api\Data\CustomerInterface $customer * @return \Magento\Customer\Api\Data\ValidationResultsInterface - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer); @@ -74,7 +74,7 @@ public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer) * @param int $customerId * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function isReadonly($customerId); @@ -84,7 +84,7 @@ public function isReadonly($customerId); * @param string $email * @param string $confirmationKey * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function activate($email, $confirmationKey); @@ -94,7 +94,7 @@ public function activate($email, $confirmationKey); * @param int $customerId * @param string $confirmationKey * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function activateById($customerId, $confirmationKey); @@ -104,7 +104,7 @@ public function activateById($customerId, $confirmationKey); * @param string $email * @param string $password * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function authenticate($email, $password); @@ -115,7 +115,7 @@ public function authenticate($email, $password); * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function changePassword($email, $currentPassword, $newPassword); @@ -126,7 +126,7 @@ public function changePassword($email, $currentPassword, $newPassword); * @param string $currentPassword * @param string $newPassword * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function changePasswordById($customerId, $currentPassword, $newPassword); @@ -137,7 +137,7 @@ public function changePasswordById($customerId, $currentPassword, $newPassword); * @param string $template * @param int $websiteId * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function initiatePasswordReset($email, $template, $websiteId = null); @@ -150,7 +150,7 @@ public function initiatePasswordReset($email, $template, $websiteId = null); * @param string $newPassword * * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException * @throws InputException */ public function resetPassword($email, $resetToken, $newPassword); @@ -167,7 +167,7 @@ public function resetPassword($email, $resetToken, $newPassword); * @throws \Magento\Framework\Exception\State\ExpiredException If token is expired * @throws \Magento\Framework\Exception\InputException If token or customer id is invalid * @throws \Magento\Framework\Exception\NoSuchEntityException If customer doesn't exist - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); @@ -176,7 +176,7 @@ public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkTo * * @param int $customerId * @return string - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function getConfirmationStatus($customerId); @@ -187,7 +187,7 @@ public function getConfirmationStatus($customerId); * @param int $websiteId * @param string $redirectUrl * @return bool true on success - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function resendConfirmation($email, $websiteId, $redirectUrl = ''); @@ -207,7 +207,7 @@ public function isEmailAvailable(string $customerEmail, int $websiteId = null): * @param int $customerWebsiteId * @param int $storeId * @return bool - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function isCustomerInStore($customerWebsiteId, $storeId); @@ -217,7 +217,7 @@ public function isCustomerInStore($customerWebsiteId, $storeId); * @param int $customerId * @return \Magento\Customer\Api\Data\AddressInterface * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function getDefaultBillingAddress($customerId); @@ -227,7 +227,7 @@ public function getDefaultBillingAddress($customerId); * @param int $customerId * @return \Magento\Customer\Api\Data\AddressInterface * @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ public function getDefaultShippingAddress($customerId); diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 49d25fc77365c..11bd9cbbbe398 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -72,7 +72,7 @@ class AccountManagement implements AccountManagementInterface /** * System Configuration Path for Enable/Disable Login at Guest Checkout */ - private const GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG = 'checkout/options/enable_guest_checkout_login'; + public const GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG = 'checkout/options/enable_guest_checkout_login'; /** * Configuration paths for create account email template diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AccountManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AccountManagementTest.php index 63f6814897863..0bac15256d355 100644 --- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AccountManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AccountManagementTest.php @@ -8,10 +8,13 @@ use Magento\Customer\Api\Data\CustomerInterface as Customer; use Magento\Customer\Model\AccountManagement; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\InputException; use Magento\Framework\Webapi\Exception as HTTPExceptionCodes; use Magento\Newsletter\Model\Subscriber; use Magento\Security\Model\Config; +use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Helper\Customer as CustomerHelper; use Magento\TestFramework\TestCase\WebapiAbstract; @@ -23,15 +26,20 @@ */ class AccountManagementTest extends WebapiAbstract { - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'customerAccountManagementV1'; - const RESOURCE_PATH = '/V1/customers'; + public const SERVICE_VERSION = 'V1'; + public const SERVICE_NAME = 'customerAccountManagementV1'; + public const RESOURCE_PATH = '/V1/customers'; /** * Sample values for testing */ - const ATTRIBUTE_CODE = 'attribute_code'; - const ATTRIBUTE_VALUE = 'attribute_value'; + public const ATTRIBUTE_CODE = 'attribute_code'; + public const ATTRIBUTE_VALUE = 'attribute_value'; + + /** + * @var ObjectManager + */ + private $objectManager; /** * @var AccountManagementInterface @@ -86,6 +94,8 @@ class AccountManagementTest extends WebapiAbstract */ protected function setUp(): void { + $this->objectManager = Bootstrap::getObjectManager(); + $this->accountManagement = Bootstrap::getObjectManager()->get( \Magento\Customer\Api\AccountManagementInterface::class ); @@ -645,6 +655,7 @@ public function testIsReadonly() public function testEmailAvailable() { + $config = $this->objectManager->get(ScopeConfigInterface::class); $customerData = $this->_createCustomer(); $serviceInfo = [ @@ -662,7 +673,18 @@ public function testEmailAvailable() 'customerEmail' => $customerData[Customer::EMAIL], 'websiteId' => $customerData[Customer::WEBSITE_ID], ]; - $this->assertFalse($this->_webApiCall($serviceInfo, $requestData)); + + $emailSetting = $config->getValue( + AccountManagement::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_WEBSITE, + $customerData[Customer::WEBSITE_ID] + ); + + if (!$emailSetting) { + $this->assertTrue($this->_webApiCall($serviceInfo, $requestData)); + } else { + $this->assertFalse($this->_webApiCall($serviceInfo, $requestData)); + } } public function testEmailAvailableInvalidEmail() diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php index f0bd7dc1e854a..750d9e69b6461 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php @@ -7,6 +7,11 @@ namespace Magento\GraphQl\Customer; +use Magento\Customer\Model\AccountManagement; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Store\Api\StoreResolverInterface; +use Magento\Store\Model\ScopeInterface; +use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQlAbstract; /** @@ -14,6 +19,25 @@ */ class IsEmailAvailableTest extends GraphQlAbstract { + /** + * @var ScopeConfigInterface + */ + private ScopeConfigInterface $scopeConfig; + + /** + * @var string + */ + private string $storeId; + + public function setUp(): void + { + $objectManager = Bootstrap::getObjectManager(); + $this->scopeConfig = $objectManager->get(ScopeConfigInterface::class); + /* @var StoreResolverInterface $storeResolver */ + $storeResolver = $objectManager->get(StoreResolverInterface::class); + $this->storeId = $storeResolver->getCurrentStoreId(); + } + /** * @magentoApiDataFixture Magento/Customer/_files/customer.php */ @@ -31,7 +55,16 @@ public function testEmailNotAvailable() self::assertArrayHasKey('isEmailAvailable', $response); self::assertArrayHasKey('is_email_available', $response['isEmailAvailable']); - self::assertFalse($response['isEmailAvailable']['is_email_available']); + $emailConfig = $this->scopeConfig->getValue( + AccountManagement::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_STORE, + $this->storeId + ); + if (!$emailConfig) { + self::assertTrue($response['isEmailAvailable']['is_email_available']); + } else { + self::assertFalse($response['isEmailAvailable']['is_email_available']); + } } /** diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php index f671cf1e69b63..c9196a581f542 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php @@ -9,6 +9,7 @@ use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\Data\AddressInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\State\ExpiredException; @@ -16,6 +17,7 @@ use Magento\Framework\Session\SessionManagerInterface; use Magento\Framework\Stdlib\DateTime; use Magento\Framework\Url as UrlBuilder; +use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Helper\Bootstrap; @@ -604,7 +606,18 @@ public function testResendConfirmationNotNeeded() */ public function testIsEmailAvailable() { - $this->assertFalse($this->accountManagement->isEmailAvailable('customer@example.com', 1)); + $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); + $guestLoginConfig = $scopeConfig->getValue( + AccountManagement::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_WEBSITE, + 1 + ); + + if (!$guestLoginConfig) { + $this->assertTrue($this->accountManagement->isEmailAvailable('customer@example.com', 1)); + } else { + $this->assertFalse($this->accountManagement->isEmailAvailable('customer@example.com', 1)); + } } /** @@ -612,7 +625,18 @@ public function testIsEmailAvailable() */ public function testIsEmailAvailableNoWebsiteSpecified() { - $this->assertFalse($this->accountManagement->isEmailAvailable('customer@example.com')); + $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); + $guestLoginConfig = $scopeConfig->getValue( + AccountManagement::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_WEBSITE, + 1 + ); + + if (!$guestLoginConfig) { + $this->assertTrue($this->accountManagement->isEmailAvailable('customer@example.com')); + } else { + $this->assertFalse($this->accountManagement->isEmailAvailable('customer@example.com')); + } } /** From 2b12a902fe0d4bafafe0862e4a77e3787effb266 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Wed, 11 Jan 2023 19:35:21 +0530 Subject: [PATCH 032/277] AC-7058: Guest Checkout REST API Fix --- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index 7940686eb1fe0..0d033cf25bce0 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -133,8 +133,9 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI { //validate guest cart address if ($address->getId() !== null) { + $size = $cart->getAddressesCollection()->getSize(); $old = $cart->getAddressesCollection()->getItemById($address->getId()); - if ($old === null) { + if ($old === null && $size > 0) { throw new NoSuchEntityException( __('Invalid quote address id %1', $address->getId()) ); From 7b1163fcd016aa189afcc89380594adf15b0a640 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Fri, 13 Jan 2023 23:07:39 +0530 Subject: [PATCH 033/277] cia-2.4.7-beta1-develop-bugfixes-01132023 resolve conflict --- app/code/Magento/Quote/Model/BillingAddressManagement.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php index 93185227b080a..9ed4f5ecd516b 100644 --- a/app/code/Magento/Quote/Model/BillingAddressManagement.php +++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php @@ -109,6 +109,7 @@ public function get($cartId) * * @return \Magento\Quote\Model\ShippingAddressAssignment * @deprecated 101.0.0 + * @see \Magento\Quote\Model\ShippingAddressAssignment */ private function getShippingAddressAssignment() { From 65b94013732a9fe52055e9fbe4db5d08fc339478 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Tue, 17 Jan 2023 16:27:02 +0530 Subject: [PATCH 034/277] AC-6695: Guest Checkout Fix --- .../Magento/Checkout/etc/adminhtml/system.xml | 2 +- .../Api/AccountManagementInterface.php | 4 +- .../Customer/Model/AccountManagement.php | 75 ++++++++++--------- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index ae5a660ccbe7a..bdddc44c752ea 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -27,7 +27,7 @@ - Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions + \Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index 3dc560c8c23a3..165233cc6a880 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -197,9 +197,9 @@ public function resendConfirmation($email, $websiteId, $redirectUrl = ''); * @param string $customerEmail * @param int|null $websiteId If not set, will use the current websiteId * @return bool - * @throws LocalizedException + * @throws \Magento\Framework\Exception\LocalizedException */ - public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool; + public function isEmailAvailable($customerEmail, $websiteId = null); /** * Check store availability for customer given the customerId. diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php index 11bd9cbbbe398..b2d3d02f76e47 100644 --- a/app/code/Magento/Customer/Model/AccountManagement.php +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -223,177 +223,177 @@ class AccountManagement implements AccountManagementInterface /** * @var CustomerFactory */ - private CustomerFactory $customerFactory; + private $customerFactory; /** * @var ValidationResultsInterfaceFactory */ - private ValidationResultsInterfaceFactory $validationResultsDataFactory; + private $validationResultsDataFactory; /** * @var ManagerInterface */ - private ManagerInterface $eventManager; + private $eventManager; /** * @var StoreManagerInterface */ - private StoreManagerInterface $storeManager; + private $storeManager; /** * @var Random */ - private Random $mathRandom; + private $mathRandom; /** * @var Validator */ - private Validator $validator; + private $validator; /** * @var AddressRepositoryInterface */ - private AddressRepositoryInterface $addressRepository; + private $addressRepository; /** * @var CustomerMetadataInterface */ - private CustomerMetadataInterface $customerMetadataService; + private $customerMetadataService; /** * @var PsrLogger */ - protected PsrLogger $logger; + protected $logger; /** * @var Encryptor */ - private Encryptor $encryptor; + private $encryptor; /** * @var CustomerRegistry */ - private CustomerRegistry $customerRegistry; + private $customerRegistry; /** * @var ConfigShare */ - private ConfigShare $configShare; + private $configShare; /** * @var StringHelper */ - protected StringHelper $stringHelper; + protected $stringHelper; /** * @var CustomerRepositoryInterface */ - private CustomerRepositoryInterface $customerRepository; + private $customerRepository; /** * @var ScopeConfigInterface */ - private ScopeConfigInterface $scopeConfig; + private $scopeConfig; /** * @var TransportBuilder */ - private TransportBuilder $transportBuilder; + private $transportBuilder; /** * @var DataObjectProcessor */ - protected DataObjectProcessor $dataProcessor; + protected $dataProcessor; /** * @var Registry */ - protected Registry $registry; + protected $registry; /** * @var CustomerViewHelper */ - protected CustomerViewHelper $customerViewHelper; + protected $customerViewHelper; /** * @var DateTime */ - protected DateTime $dateTime; + protected $dateTime; /** * @var ObjectFactory */ - protected ObjectFactory $objectFactory; + protected $objectFactory; /** * @var ExtensibleDataObjectConverter */ - protected ExtensibleDataObjectConverter $extensibleDataObjectConverter; + protected $extensibleDataObjectConverter; /** * @var CustomerModel */ - protected CustomerModel $customerModel; + protected $customerModel; /** * @var AuthenticationInterface */ - protected AuthenticationInterface $authentication; + protected $authentication; /** * @var EmailNotificationInterface */ - private EmailNotificationInterface $emailNotification; + private $emailNotification; /** * @var Backend */ - private Backend $eavValidator; + private $eavValidator; /** * @var CredentialsValidator */ - private CredentialsValidator $credentialsValidator; + private $credentialsValidator; /** * @var DateTimeFactory */ - private DateTimeFactory $dateTimeFactory; + private $dateTimeFactory; /** * @var AccountConfirmation */ - private AccountConfirmation $accountConfirmation; + private $accountConfirmation; /** * @var SearchCriteriaBuilder */ - private SearchCriteriaBuilder $searchCriteriaBuilder; + private $searchCriteriaBuilder; /** * @var AddressRegistry */ - private AddressRegistry $addressRegistry; + private $addressRegistry; /** * @var AllowedCountries */ - private AllowedCountries $allowedCountriesReader; + private $allowedCountriesReader; /** * @var GetCustomerByToken */ - private GetCustomerByToken $getByToken; + private $getByToken; /** * @var SessionCleanerInterface */ - private SessionCleanerInterface $sessionCleaner; + private $sessionCleaner; /** * @var AuthorizationInterface */ - private AuthorizationInterface $authorization; + private $authorization; /** * @var CustomerLogger @@ -1146,8 +1146,9 @@ public function validate(CustomerInterface $customer) * @param string $customerEmail * @param int|null $websiteId * @return bool + * @throws LocalizedException */ - public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool + public function isEmailAvailable($customerEmail, $websiteId = null) { $guestLoginConfig = $this->scopeConfig->getValue( self::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, @@ -1155,7 +1156,7 @@ public function isEmailAvailable(string $customerEmail, int $websiteId = null): $websiteId ); - if ($guestLoginConfig === null || $guestLoginConfig === false) { + if (!$guestLoginConfig) { return true; } From 4be948b7d3e664fb9a5ef8c4a840601ca2b832b0 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Mon, 23 Jan 2023 21:23:22 +0530 Subject: [PATCH 035/277] AC-6695: Guest Checkout Fix --- app/code/Magento/Checkout/etc/adminhtml/system.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index bdddc44c752ea..63ca976cd1907 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -16,6 +16,7 @@ Magento\Config\Model\Config\Source\Yesno + Enabling this setting will allow unauthenticated users to query if an e-mail address is already associated with a customer account. This can be used to enhance the checkout workflow for guests that do not realize they already have an account but comes at the cost of exposing information to unauthenticated users. From fe47b7bdac724f748563b3237a86e071947e6f6d Mon Sep 17 00:00:00 2001 From: Dmytro Voskoboinikov Date: Mon, 23 Jan 2023 12:24:50 -0600 Subject: [PATCH 036/277] AC-7093: Legitimate nested directive use cases broken --- .../Magento/Framework/Filter/Template.php | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/lib/internal/Magento/Framework/Filter/Template.php b/lib/internal/Magento/Framework/Filter/Template.php index 7e558c4ea1d70..92c4930eee367 100644 --- a/lib/internal/Magento/Framework/Filter/Template.php +++ b/lib/internal/Magento/Framework/Filter/Template.php @@ -189,6 +189,7 @@ public function getTemplateProcessor() * * @param string $value * @return string + * * @throws \Exception */ public function filter($value) @@ -203,19 +204,21 @@ public function filter($value) $this->filteringDepthMeter->descend(); // Processing of template directives. - $templateDirectivesResults = $this->processDirectives($value); + $templateDirectivesResults = array_unique( + $this->processDirectives($value), + SORT_REGULAR + ); - foreach ($templateDirectivesResults as $result) { - $value = str_replace($result['directive'], $result['output'], $value); - } + $value = $this->applyDirectivesResults($value, $templateDirectivesResults); // Processing of deferred directives received from child templates // or nested directives. - $deferredDirectivesResults = $this->processDirectives($value, true); + $deferredDirectivesResults = array_unique( + $this->processDirectives($value, true), + SORT_REGULAR + ); - foreach ($deferredDirectivesResults as $result) { - $value = str_replace($result['directive'], $result['output'], $value); - } + $value = $this->applyDirectivesResults($value, $deferredDirectivesResults); if ($this->filteringDepthMeter->showMark() > 1) { // Signing own deferred directives (if any). @@ -282,6 +285,35 @@ private function processDirectives($value, $isSigned = false): array return $results; } + /** + * Applies results produced by directives. + * + * @param string $value + * @param array $results + * + * @return string + */ + private function applyDirectivesResults(string $value, array $results): string + { + $processedResults = []; + + foreach ($results as $result) { + foreach ($processedResults as $processedResult) { + $result['directive'] = str_replace( + $processedResult['directive'], + $processedResult['output'], + $result['directive'] + ); + } + + $value = str_replace($result['directive'], $result['output'], $value); + + $processedResults[] = $result; + } + + return $value; + } + /** * Modifies given regular expression pattern to be able to recognize signed directives. * From 6cc38a9dedf14958a3585d17e5ff5ebb02475663 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Fri, 27 Jan 2023 00:12:22 +0530 Subject: [PATCH 037/277] AC-7668 - Backend Catalog Improvments --- app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js index d292bd126593c..19891b41a6d95 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js @@ -87,7 +87,7 @@ define([ // jscs:disable requireCamelCaseOrUpperCaseIdentifiers result = { id: node.id, - text: utils.unescape(node.name) + ' (' + node.product_count + ')', + text: node.name + ' (' + node.product_count + ')', li_attr: { class: node.cls + (!!node.disabled ? ' disabled' : '') //eslint-disable-line no-extra-boolean-cast }, From e97d90cb1715800cd2ad540cecd5549d7bffbd61 Mon Sep 17 00:00:00 2001 From: Sreeni A Date: Mon, 30 Jan 2023 09:18:44 +0530 Subject: [PATCH 038/277] AC-7668 - Backend Catalog Improvments --- .../Magento/Catalog/view/adminhtml/web/js/category-tree.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js index 19891b41a6d95..b4d4ed12d20ba 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js @@ -5,10 +5,9 @@ define([ 'jquery', - 'mageUtils', 'jquery/ui', 'jquery/jstree/jquery.jstree' -], function ($, utils) { +], function ($) { 'use strict'; $.widget('mage.categoryTree', { From e7ffb9e24c1a55112e505c105b6ddc3339c927d6 Mon Sep 17 00:00:00 2001 From: Binh Tran Date: Thu, 2 Feb 2023 10:12:29 -0600 Subject: [PATCH 039/277] AC-6897 Template improvements --- .../Unit/Pricing/Render/FinalPriceBoxTest.php | 36 ++++++++++++++---- .../Magento/Email/Model/Template/Filter.php | 6 +++ .../Renderer/Listing/ConfigurableTest.php | 29 +++++++++++--- .../Framework/View/Element/AbstractBlock.php | 35 +++++++++++++---- .../Test/Unit/Element/AbstractBlockTest.php | 38 +++++++++++++------ 5 files changed, 112 insertions(+), 32 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php index fc47c6f50ab95..a97c75d32da15 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php @@ -19,6 +19,7 @@ use Magento\Framework\App\State; use Magento\Framework\Config\ConfigOptionsListConstants; use Magento\Framework\Event\Test\Unit\ManagerStub; +use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Pricing\Amount\AmountInterface; use Magento\Framework\Pricing\Price\PriceInterface; use Magento\Framework\Pricing\PriceInfoInterface; @@ -98,11 +99,27 @@ class FinalPriceBoxTest extends TestCase */ private $minimalPriceCalculator; + /** + * @var DeploymentConfig|MockObject + */ + private $deploymentConfig; + + /** + * @var ObjectManagerInterface|MockObject + */ + private $objectManagerMock; + /** * @inheritDoc + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function setUp(): void { + $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class) + ->disableOriginalConstructor() + ->onlyMethods(['get']) + ->getMockForAbstractClass(); + \Magento\Framework\App\ObjectManager::setInstance($this->objectManagerMock); $this->product = $this->getMockBuilder(Product::class) ->addMethods(['getCanShowPrice']) ->onlyMethods(['getPriceInfo', 'isSalable', 'getId']) @@ -185,16 +202,11 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMockForAbstractClass(); - $deploymentConfig = $this->createPartialMock( + $this->deploymentConfig = $this->createPartialMock( DeploymentConfig::class, ['get'] ); - $deploymentConfig->expects($this->any()) - ->method('get') - ->with(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY) - ->willReturn('448198e08af35844a42d3c93c1ef4e03'); - $this->minimalPriceCalculator = $this->getMockForAbstractClass(MinimalPriceCalculatorInterface::class); $this->object = $objectManager->getObject( FinalPriceBox::class, @@ -205,8 +217,7 @@ protected function setUp(): void 'price' => $this->price, 'data' => ['zone' => 'test_zone', 'list_category_page' => true], 'salableResolver' => $this->salableResolverMock, - 'minimalPriceCalculator' => $this->minimalPriceCalculator, - 'deploymentConfig' => $deploymentConfig, + 'minimalPriceCalculator' => $this->minimalPriceCalculator ] ); } @@ -468,6 +479,15 @@ public function testHidePrice(): void */ public function testGetCacheKey(): void { + $this->objectManagerMock->expects($this->any()) + ->method('get') + ->with(DeploymentConfig::class) + ->willReturn($this->deploymentConfig); + + $this->deploymentConfig->expects($this->any()) + ->method('get') + ->with(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY) + ->willReturn('448198e08af35844a42d3c93c1ef4e03'); $result = $this->object->getCacheKey(); $this->assertStringEndsWith('list-category-page', $result); } diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 6d65fa65bbe45..57478f76765b1 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 Session ID's in URL */ protected $_useSessionInUrl = false; /** * @var array * @deprecated 101.0.4 Use the new Directive Processor interfaces + * @see Directive Processor interfaces */ protected $_modifiers = ['nl2br' => '']; @@ -286,6 +288,7 @@ public function setUseAbsoluteLinks($flag) * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @deprecated SID query parameter is not used in URLs anymore. + * @see SessionId's in URL */ public function setUseSessionInUrl($flag) { @@ -698,6 +701,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 Directive Processor Interfaces */ protected function explodeModifiers($value, $default = null) { @@ -717,6 +721,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 Directive Processor Interfaces */ protected function applyModifiers($value, $modifiers) { @@ -746,6 +751,7 @@ protected function applyModifiers($value, $modifiers) * @param string $type * @return string * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces + * @see Directive Processor Interfacees */ public function modifierEscape($value, $type = 'html') { diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/Listing/ConfigurableTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/Listing/ConfigurableTest.php index 7b68bf6256077..7f58641d4d227 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/Listing/ConfigurableTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/Listing/ConfigurableTest.php @@ -21,12 +21,13 @@ use Magento\Eav\Api\Data\AttributeInterface; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; use Magento\Framework\App\Config\ScopeConfigInterface; -use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\Request\Http; use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\DeploymentConfig; use Magento\Framework\Config\ConfigOptionsListConstants; use Magento\Framework\Json\EncoderInterface; use Magento\Framework\Model\AbstractModel; +use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Pricing\PriceCurrencyInterface; use Magento\Framework\Pricing\PriceInfo\Base; use Magento\Framework\Stdlib\ArrayUtils; @@ -97,8 +98,23 @@ class ConfigurableTest extends TestCase */ private $request; + /** + * @var ObjectManagerInterface|MockObject + */ + private $objectManagerMock; + + /** + * @var DeploymentConfig|MockObject + */ + private $deploymentConfig; + protected function setUp(): void { + $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class) + ->disableOriginalConstructor() + ->onlyMethods(['get']) + ->getMockForAbstractClass(); + \Magento\Framework\App\ObjectManager::setInstance($this->objectManagerMock); $this->arrayUtils = $this->createMock(ArrayUtils::class); $this->jsonEncoder = $this->getMockForAbstractClass(EncoderInterface::class); $this->helper = $this->createMock(Data::class); @@ -129,12 +145,12 @@ protected function setUp(): void $context = $this->getContextMock(); $context->method('getRequest')->willReturn($this->request); - $deploymentConfig = $this->createPartialMock( + $this->deploymentConfig = $this->createPartialMock( DeploymentConfig::class, ['get'] ); - $deploymentConfig->expects($this->any()) + $this->deploymentConfig->expects($this->any()) ->method('get') ->with(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY) ->willReturn('448198e08af35844a42d3c93c1ef4e03'); @@ -158,8 +174,7 @@ protected function setUp(): void 'configurableAttributeData' => $this->configurableAttributeData, 'data' => [], 'variationPrices' => $this->variationPricesMock, - 'customerSession' => $customerSession, - 'deploymentConfig' => $deploymentConfig, + 'customerSession' => $customerSession ] ); } @@ -321,6 +336,10 @@ public function testGetCacheKey() ->willReturn($configurableAttributes); $this->request->method('toArray')->willReturn($requestParams); + $this->objectManagerMock->expects($this->any()) + ->method('get') + ->with(DeploymentConfig::class) + ->willReturn($this->deploymentConfig); $this->assertStringContainsString( sha1(json_encode(['color' => 59, 'size' => 1])), $this->configurable->getCacheKey() diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index ae8f48a03d1a7..a1543b16e5a01 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -54,6 +54,7 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl /** * @var \Magento\Framework\Session\SidResolverInterface * @deprecated 102.0.5 Not used anymore. + * @see Session Id's In URL */ protected $_sidResolver; @@ -184,12 +185,10 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl * * @param \Magento\Framework\View\Element\Context $context * @param array $data - * @param DeploymentConfig $deploymentConfig */ public function __construct( \Magento\Framework\View\Element\Context $context, - array $data = [], - DeploymentConfig $deploymentConfig = null + array $data = [] ) { $this->_request = $context->getRequest(); $this->_layout = $context->getLayout(); @@ -210,9 +209,6 @@ public function __construct( $this->inlineTranslation = $context->getInlineTranslation(); $this->lockQuery = $context->getLockGuardedCacheLoader(); - $this->deploymentConfig = $deploymentConfig ?? ObjectManager::getInstance() - ->get(DeploymentConfig::class); - if (isset($data['jsLayout'])) { $this->jsLayout = $data['jsLayout']; unset($data['jsLayout']); @@ -894,6 +890,7 @@ public static function extractModuleName($className) * @param array|null $allowedTags * @return string * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. + * @see Escaper Usage */ public function escapeHtml($data, $allowedTags = null) { @@ -907,6 +904,7 @@ public function escapeHtml($data, $allowedTags = null) * @return string * @since 101.0.0 * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. + * @see Escaper Usage */ public function escapeJs($string) { @@ -921,6 +919,7 @@ public function escapeJs($string) * @return string * @since 101.0.0 * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. + * @see Escaper Usage */ public function escapeHtmlAttr($string, $escapeSingleQuote = true) { @@ -934,6 +933,7 @@ public function escapeHtmlAttr($string, $escapeSingleQuote = true) * @return string * @since 101.0.0 * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. + * @see Escaper Usage */ public function escapeCss($string) { @@ -961,6 +961,7 @@ public function stripTags($data, $allowableTags = null, $allowHtmlEntities = fal * @param string $string * @return string * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. + * @see Escaper Usage */ public function escapeUrl($string) { @@ -973,6 +974,7 @@ public function escapeUrl($string) * @param string $data * @return string * @deprecated 101.0.0 + * @see Escaper Usage */ public function escapeXssInUrl($data) { @@ -988,6 +990,7 @@ public function escapeXssInUrl($data) * @param bool $addSlashes * @return string * @deprecated 101.0.0 + * @see Escaper Usage */ public function escapeQuote($data, $addSlashes = false) { @@ -1002,6 +1005,7 @@ public function escapeQuote($data, $addSlashes = false) * * @return string|array * @deprecated 101.0.0 + * @see Escaper Usage */ public function escapeJsQuote($data, $quote = '\'') { @@ -1049,7 +1053,9 @@ public function getCacheKey() $key = array_values($key); // ignore array keys - $key[] = (string)$this->deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY); + $key[] = (string)$this->getDeploymentConfig()->get( + ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY + ); $key = implode('|', $key); $key = hash('sha256', $key); // use hashing to hide potentially private data @@ -1191,10 +1197,25 @@ public function getVar($name, $module = null) * * @return bool * @deprecated + * @see https://developer.adobe.com/commerce/php/development/cache/page/private-content * @since 103.0.1 */ public function isScopePrivate() { return $this->_isScopePrivate; } + + /** + * Get DeploymentConfig + * + * @return DeploymentConfig + */ + private function getDeploymentConfig() : DeploymentConfig + { + if ($this->deploymentConfig === null) { + $this->deploymentConfig = ObjectManager::getInstance() + ->get(DeploymentConfig::class); + } + return $this->deploymentConfig; + } } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php index 362aab83854e9..55c84f9b5ca3a 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php @@ -15,6 +15,7 @@ use Magento\Framework\Config\View; use Magento\Framework\Escaper; use Magento\Framework\Event\ManagerInterface as EventManagerInterface; +use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Session\SessionManagerInterface; use Magento\Framework\Session\SidResolverInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; @@ -76,11 +77,21 @@ class AbstractBlockTest extends TestCase */ private $deploymentConfig; + /** + * @var ObjectManagerInterface|MockObject + */ + private $objectManagerMock; + /** * @return void */ protected function setUp(): void { + $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class) + ->disableOriginalConstructor() + ->onlyMethods(['create']) + ->getMockForAbstractClass(); + \Magento\Framework\App\ObjectManager::setInstance($this->objectManagerMock); $this->eventManagerMock = $this->getMockForAbstractClass(EventManagerInterface::class); $this->scopeConfigMock = $this->getMockForAbstractClass(ScopeConfigInterface::class); $this->cacheStateMock = $this->getMockForAbstractClass(CacheStateInterface::class); @@ -116,24 +127,17 @@ protected function setUp(): void ->method('getLockGuardedCacheLoader') ->willReturn($this->lockQuery); - $this->deploymentConfig = $this->createPartialMock( - DeploymentConfig::class, - ['get'] - ); - - $this->deploymentConfig->expects($this->any()) - ->method('get') - ->with(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY) - ->willReturn('448198e08af35844a42d3c93c1ef4e03'); - $this->block = $this->getMockForAbstractClass( AbstractBlock::class, [ 'context' => $contextMock, - 'data' => [], - 'deploymentConfig' => $this->deploymentConfig, + 'data' => [] ] ); + $this->deploymentConfig = $this->createPartialMock( + DeploymentConfig::class, + ['get'] + ); } /** @@ -243,6 +247,16 @@ public function testGetCacheKey() */ public function testGetCacheKeyByName() { + $this->objectManagerMock->expects($this->any()) + ->method('get') + ->with(DeploymentConfig::class) + ->willReturn($this->deploymentConfig); + + $this->deploymentConfig->expects($this->any()) + ->method('get') + ->with(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY) + ->willReturn('448198e08af35844a42d3c93c1ef4e03'); + $nameInLayout = 'testBlock'; $this->block->setNameInLayout($nameInLayout); $encryptionKey = $this->deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_CRYPT_KEY); From 5c325c0475ae1e351d60ee00e369e1d1b47c316e Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Fri, 3 Feb 2023 20:52:24 +0530 Subject: [PATCH 040/277] AC-7832: Remove Cart Item Fix --- .../Model/Resolver/RemoveItemFromCart.php | 2 + .../Quote/Customer/RemoveItemFromCartTest.php | 54 +++++++++++++++++-- 2 files changed, 51 insertions(+), 5 deletions(-) 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); 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..b1978964d0d4d 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 @@ -11,6 +11,7 @@ use Magento\GraphQl\Quote\GetQuoteItemIdByReservedQuoteIdAndSku; use Magento\Integration\Api\CustomerTokenServiceInterface; use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException; use Magento\TestFramework\TestCase\GraphQlAbstract; /** @@ -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 << Date: Tue, 7 Feb 2023 15:18:08 -0600 Subject: [PATCH 041/277] AC-1271: Static test fix --- .../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..29ace4949d7be 100644 --- a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php +++ b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php @@ -43,6 +43,7 @@ public function __construct( /** * Validate resolver args * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @param Field $field * @param array $args * @return void From 764c5196621aa62611c6deaf13a20595460c7a01 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 9 Feb 2023 23:39:56 +0530 Subject: [PATCH 042/277] AC-7832: Remove Cart Item Fix --- .../Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php index abd5ceca881f4..307087391b89d 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php @@ -87,7 +87,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value $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); + $cart = $this->getCartForUser->execute($maskedCartId, $context->getUserId(), $storeId); try { $this->cartItemRepository->deleteById($cartId, $itemId); @@ -97,7 +97,6 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value throw new GraphQlInputException(__($e->getMessage()), $e); } - $cart = $this->getCartForUser->execute($maskedCartId, $context->getUserId(), $storeId); return [ 'cart' => [ 'model' => $cart, From 484768feffad91844bdb2a43b9404d5cff88f43c Mon Sep 17 00:00:00 2001 From: admanesachin <40776763+admanesachin@users.noreply.github.com> Date: Thu, 9 Feb 2023 19:39:24 -0600 Subject: [PATCH 043/277] Revert "Cia 2.4.7 beta1 bugfixes 02062023" --- .../Authorization/Model/IdentityProvider.php | 87 ------ .../Test/Unit/Model/IdentityProviderTest.php | 133 -------- app/code/Magento/Authorization/etc/di.xml | 2 - app/code/Magento/Authorization/i18n/en_US.csv | 2 - .../WebapiRequestTypeExtractor.php | 43 --- .../WebapiRequestTypeExtractorTest.php | 67 ---- app/code/Magento/Checkout/etc/di.xml | 9 - .../BackpressureContextFactory.php | 73 ----- .../BackpressureFieldValidator.php | 65 ---- .../CompositeRequestTypeExtractor.php | 45 --- .../Model/Backpressure/GraphQlContext.php | 106 ------- .../GraphQlTooManyRequestsException.php | 54 ---- .../RequestTypeExtractorInterface.php | 25 -- .../BackpressureContextFactoryTest.php | 132 -------- app/code/Magento/GraphQl/etc/di.xml | 11 - .../Model/BackpressureTypeExtractor.php | 46 --- app/code/Magento/InstantPurchase/etc/di.xml | 10 - .../Model/Backpressure/Config/LimitValue.php | 35 --- .../Backpressure/Config/PeriodSource.php | 29 -- .../Model/Backpressure/Config/PeriodValue.php | 76 ----- .../Backpressure/OrderLimitConfigManager.php | 102 ------ .../WebapiRequestTypeExtractor.php | 49 --- .../OrderLimitConfigManagerTest.php | 124 -------- .../WebapiRequestTypeExtractorTest.php | 71 ----- .../Magento/Quote/etc/adminhtml/system.xml | 31 -- app/code/Magento/Quote/etc/config.xml | 8 - app/code/Magento/Quote/etc/di.xml | 16 - app/code/Magento/Quote/i18n/en_US.csv | 4 - .../BackpressureRequestTypeExtractor.php | 62 ---- app/code/Magento/QuoteGraphQl/etc/di.xml | 9 - .../Controller/Rest/RequestValidator.php | 101 ++---- .../Controller/Soap/Request/Handler.php | 64 +--- .../Controller/Rest/RequestValidatorTest.php | 8 +- app/code/Magento/Webapi/i18n/en_US.csv | 1 - app/etc/di.xml | 25 -- .../Controller/Read/Read.php | 40 --- .../Model/LimitConfigManager.php | 24 -- .../Model/TypeExtractor.php | 28 -- .../composer.json | 21 -- .../etc/di.xml | 27 -- .../etc/frontend/routes.xml | 14 - .../etc/module.xml | 10 - .../registration.php | 13 - .../Model/LimitConfigManager.php | 24 -- .../Model/TestServiceResolver.php | 41 --- .../Model/TypeExtractor.php | 27 -- .../composer.json | 21 -- .../TestModuleGraphQlBackpressure/etc/di.xml | 29 -- .../etc/module.xml | 10 - .../etc/routes.xml | 14 - .../etc/schema.graphqls | 10 - .../registration.php | 13 - .../Api/TestReadServiceInterface.php | 17 - .../Model/LimitConfigManager.php | 24 -- .../Model/TestReadService.php | 39 --- .../Model/TypeExtractor.php | 27 -- .../composer.json | 21 -- .../TestModuleWebapiBackpressure/etc/di.xml | 29 -- .../etc/module.xml | 10 - .../etc/routes.xml | 14 - .../etc/webapi.xml | 17 - .../registration.php | 13 - .../Checkout/Model/BackpressureTest.php | 119 ------- .../ControllerBackpressureTest.php | 53 ---- .../GraphQl/Quote/BackpressureTest.php | 110 ------- .../Model/BackpressureTest.php | 102 ------ .../Magento/Quote/Model/BackpressureTest.php | 119 ------- .../BackpressureExceededException.php | 16 - .../App/Backpressure/ContextInterface.php | 53 ---- .../IdentityProviderInterface.php | 29 -- .../CompositeLimitConfigManager.php | 50 --- .../SlidingWindow/LimitConfig.php | 55 ---- .../LimitConfigManagerInterface.php | 25 -- .../SlidingWindow/RedisRequestLogger.php | 112 ------- .../RedisRequestLogger/RedisClient.php | 249 --------------- .../SlidingWindow/RequestLoggerFactory.php | 53 ---- .../RequestLoggerFactoryInterface.php | 25 -- .../SlidingWindow/RequestLoggerInterface.php | 40 --- .../SlidingWindow/SlidingWindowEnforcer.php | 120 ------- .../App/BackpressureEnforcerInterface.php | 27 -- .../CompositeRequestTypeExtractor.php | 46 --- .../Request/Backpressure/ContextFactory.php | 72 ----- .../Backpressure/ControllerContext.php | 107 ------- .../RequestTypeExtractorInterface.php | 27 -- .../App/Request/BackpressureValidator.php | 90 ------ .../SlidingWindow/RedisRequestLoggerTest.php | 92 ------ .../SlidingWindowEnforcerTest.php | 231 -------------- .../Backpressure/ContextFactoryTest.php | 130 -------- .../BackpressureContextFactory.php | 75 ----- ...kpressureRequestTypeExtractorInterface.php | 25 -- .../CompositeRequestTypeExtractor.php | 43 --- .../Webapi/Backpressure/RestContext.php | 142 --------- .../Magento/Framework/Webapi/Exception.php | 25 +- .../BackpressureContextFactoryTest.php | 119 ------- .../CompositeRequestTypeExtractorTest.php | 82 ----- setup/src/Magento/Setup/Model/ConfigModel.php | 2 +- .../Magento/Setup/Model/ConfigOptionsList.php | 1 - .../ConfigOptionsList/BackpressureLogger.php | 295 ------------------ .../BackpressureLoggerTest.php | 268 ---------------- 99 files changed, 44 insertions(+), 5487 deletions(-) delete mode 100644 app/code/Magento/Authorization/Model/IdentityProvider.php delete mode 100644 app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php delete mode 100644 app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php delete mode 100644 app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php delete mode 100644 app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php delete mode 100644 app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php delete mode 100644 app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php delete mode 100644 app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php delete mode 100644 app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php delete mode 100644 app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php delete mode 100644 app/code/Magento/GraphQl/Test/Unit/Model/Backpressure/BackpressureContextFactoryTest.php delete mode 100644 app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php delete mode 100644 app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php delete mode 100644 app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php delete mode 100644 app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php delete mode 100644 app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php delete mode 100644 app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php delete mode 100644 app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php delete mode 100644 app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php delete mode 100644 app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/TypeExtractor.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/composer.json delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/di.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TestServiceResolver.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls delete mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/LimitConfigManager.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TestReadService.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/composer.json delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/di.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml delete mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php delete mode 100644 dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/ContextInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/IdentityProviderInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/CompositeLimitConfigManager.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/SlidingWindowEnforcer.php delete mode 100644 lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/CompositeRequestTypeExtractor.php delete mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php delete mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php delete mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php delete mode 100644 lib/internal/Magento/Framework/App/Request/BackpressureValidator.php delete mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php delete mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php delete mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php delete mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php delete mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php delete mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/CompositeRequestTypeExtractor.php delete mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php delete mode 100644 lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/BackpressureContextFactoryTest.php delete mode 100644 lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php delete mode 100644 setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php delete mode 100644 setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php diff --git a/app/code/Magento/Authorization/Model/IdentityProvider.php b/app/code/Magento/Authorization/Model/IdentityProvider.php deleted file mode 100644 index b29a8e7f9c530..0000000000000 --- a/app/code/Magento/Authorization/Model/IdentityProvider.php +++ /dev/null @@ -1,87 +0,0 @@ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - UserContextInterface::USER_TYPE_ADMIN => ContextInterface::IDENTITY_TYPE_ADMIN - ]; - - /** - * @var UserContextInterface - */ - private UserContextInterface $userContext; - - /** - * @var RemoteAddress - */ - private RemoteAddress $remoteAddress; - - /** - * @param UserContextInterface $userContext - * @param RemoteAddress $remoteAddress - */ - public function __construct(UserContextInterface $userContext, RemoteAddress $remoteAddress) - { - $this->userContext = $userContext; - $this->remoteAddress = $remoteAddress; - } - - /** - * @inheritDoc - * - * @throws RuntimeException - */ - public function fetchIdentityType(): int - { - if (!$this->userContext->getUserId()) { - return ContextInterface::IDENTITY_TYPE_IP; - } - - $userType = $this->userContext->getUserType(); - if (isset(self::USER_CONTEXT_IDENTITY_TYPE_MAP[$userType])) { - return self::USER_CONTEXT_IDENTITY_TYPE_MAP[$userType]; - } - - throw new RuntimeException(__('User type not defined')); - } - - /** - * @inheritDoc - * - * @throws RuntimeException - */ - public function fetchIdentity(): string - { - $userId = $this->userContext->getUserId(); - if ($userId) { - return (string)$userId; - } - - $address = $this->remoteAddress->getRemoteAddress(); - if (!$address) { - throw new RuntimeException(__('Failed to extract remote address')); - } - - return $address; - } -} diff --git a/app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php b/app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php deleted file mode 100644 index 6c057f81b9e33..0000000000000 --- a/app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php +++ /dev/null @@ -1,133 +0,0 @@ -userContext = $this->createMock(UserContextInterface::class); - $this->remoteAddress = $this->createMock(RemoteAddress::class); - $this->model = new IdentityProvider($this->userContext, $this->remoteAddress); - } - - /** - * Cases for identity provider. - * - * @return array - */ - public function getIdentityCases(): array - { - return [ - 'empty-user-context' => [null, null, '127.0.0.1', ContextInterface::IDENTITY_TYPE_IP, '127.0.0.1'], - 'guest-user-context' => [ - UserContextInterface::USER_TYPE_GUEST, - null, - '127.0.0.1', - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1' - ], - 'admin-user-context' => [ - UserContextInterface::USER_TYPE_ADMIN, - 42, - '127.0.0.1', - ContextInterface::IDENTITY_TYPE_ADMIN, - '42' - ], - 'customer-user-context' => [ - UserContextInterface::USER_TYPE_CUSTOMER, - 42, - '127.0.0.1', - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42' - ], - ]; - } - - /** - * Verify identity provider. - * - * @param int|null $userType - * @param int|null $userId - * @param string $remoteAddr - * @param int $expectedType - * @param string $expectedIdentity - * @return void - * @dataProvider getIdentityCases - */ - public function testFetchIdentity( - ?int $userType, - ?int $userId, - string $remoteAddr, - int $expectedType, - string $expectedIdentity - ): void { - $this->userContext->method('getUserType')->willReturn($userType); - $this->userContext->method('getUserId')->willReturn($userId); - $this->remoteAddress->method('getRemoteAddress')->willReturn($remoteAddr); - - $this->assertEquals($expectedType, $this->model->fetchIdentityType()); - $this->assertEquals($expectedIdentity, $this->model->fetchIdentity()); - } - - /** - * Tests fetching an identity type when user type can't be defined - */ - public function testFetchIdentityTypeUserTypeNotDefined() - { - $this->userContext->method('getUserId')->willReturn(2); - $this->userContext->method('getUserType')->willReturn(null); - $this->expectException(RuntimeException::class); - $this->expectExceptionMessage(__('User type not defined')->getText()); - $this->model->fetchIdentityType(); - } - - /** - * Tests fetching an identity when user address can't be extracted - */ - public function testFetchIdentityFailedToExtractRemoteAddress() - { - $this->userContext->method('getUserId')->willReturn(null); - $this->remoteAddress->method('getRemoteAddress')->willReturn(false); - $this->expectException(RuntimeException::class); - $this->expectExceptionMessage(__('Failed to extract remote address')->getText()); - $this->model->fetchIdentity(); - } -} diff --git a/app/code/Magento/Authorization/etc/di.xml b/app/code/Magento/Authorization/etc/di.xml index bace3690a6066..21420922ef596 100644 --- a/app/code/Magento/Authorization/etc/di.xml +++ b/app/code/Magento/Authorization/etc/di.xml @@ -24,6 +24,4 @@ - diff --git a/app/code/Magento/Authorization/i18n/en_US.csv b/app/code/Magento/Authorization/i18n/en_US.csv index f52cf7ebec2b7..c2d0eaa1df978 100644 --- a/app/code/Magento/Authorization/i18n/en_US.csv +++ b/app/code/Magento/Authorization/i18n/en_US.csv @@ -1,4 +1,2 @@ "We can't find the role for the user you wanted.","We can't find the role for the user you wanted." "Something went wrong while compiling a list of allowed resources. You can find out more in the exceptions log.","Something went wrong while compiling a list of allowed resources. You can find out more in the exceptions log." -"User type not defined","User type not defined" -"Failed to extract remote address","Failed to extract remote address" diff --git a/app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php b/app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php deleted file mode 100644 index a01bf234ec93b..0000000000000 --- a/app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php +++ /dev/null @@ -1,43 +0,0 @@ -config = $config; - } - - /** - * @inheritDoc - */ - public function extract(string $service, string $method, string $endpoint): ?string - { - return self::METHOD === $method && $this->config->isEnforcementEnabled() - ? OrderLimitConfigManager::REQUEST_TYPE_ID - : null; - } -} diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php deleted file mode 100644 index a55920fb1cf2e..0000000000000 --- a/app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php +++ /dev/null @@ -1,67 +0,0 @@ -orderLimitConfigManagerMock = $this->createMock(OrderLimitConfigManager::class); - - $this->webapiRequestTypeExtractor = new WebapiRequestTypeExtractor($this->orderLimitConfigManagerMock); - } - - /** - * @param bool $isEnforcementEnabled - * @param string $method - * @param string|null $expected - * @dataProvider dataProvider - */ - public function testExtract(bool $isEnforcementEnabled, string $method, $expected) - { - $this->orderLimitConfigManagerMock->method('isEnforcementEnabled')->willReturn($isEnforcementEnabled); - - $this->assertEquals( - $expected, - $this->webapiRequestTypeExtractor->extract('someService', $method, 'someEndpoint') - ); - } - - /** - * @return array - */ - public function dataProvider(): array - { - return [ - [false, 'someMethod', null], - [false, 'savePaymentInformationAndPlaceOrder', null], - [true, 'savePaymentInformationAndPlaceOrder', 'quote-order'], - ]; - } -} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index 7d57d7be4b736..280944dc4090c 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -54,15 +54,6 @@ type="Magento\Checkout\Model\CaptchaPaymentProcessingRateLimiter" /> - - - - - Magento\Checkout\Model\Backpressure\WebapiRequestTypeExtractor - - - - diff --git a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php deleted file mode 100644 index b6598e561100c..0000000000000 --- a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php +++ /dev/null @@ -1,73 +0,0 @@ -extractor = $extractor; - $this->identityProvider = $identityProvider; - $this->request = $request; - } - - /** - * Creates context if possible - * - * @param Field $field - * @return ContextInterface|null - */ - public function create(Field $field): ?ContextInterface - { - $typeId = $this->extractor->extract($field); - if ($typeId === null) { - return null; - } - - return new GraphQlContext( - $this->request, - $this->identityProvider->fetchIdentity(), - $this->identityProvider->fetchIdentityType(), - $typeId, - $field->getResolver() - ); - } -} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php deleted file mode 100644 index 29ace4949d7be..0000000000000 --- a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php +++ /dev/null @@ -1,65 +0,0 @@ -backpressureContextFactory = $backpressureContextFactory; - $this->backpressureEnforcer = $backpressureEnforcer; - } - - /** - * Validate resolver args - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @param Field $field - * @param array $args - * @return void - * @throws GraphQlTooManyRequestsException - */ - public function validate(Field $field, $args): void - { - $context = $this->backpressureContextFactory->create($field); - if (!$context) { - return; - } - - try { - $this->backpressureEnforcer->enforce($context); - } catch (BackpressureExceededException $exception) { - throw new GraphQlTooManyRequestsException(__('Too Many Requests')); - } - } -} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php b/app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php deleted file mode 100644 index f3fb9d9988975..0000000000000 --- a/app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php +++ /dev/null @@ -1,45 +0,0 @@ -extractors = $extractors; - } - - /** - * @inheritDoc - */ - public function extract(Field $field): ?string - { - foreach ($this->extractors as $extractor) { - $type = $extractor->extract($field); - if ($type) { - return $type; - } - } - - return null; - } -} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php b/app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php deleted file mode 100644 index 5ce30093d46ee..0000000000000 --- a/app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php +++ /dev/null @@ -1,106 +0,0 @@ -request = $request; - $this->identity = $identity; - $this->identityType = $identityType; - $this->typeId = $typeId; - $this->resolverClass = $resolverClass; - } - - /** - * @inheritDoc - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * @inheritDoc - */ - public function getIdentity(): string - { - return $this->identity; - } - - /** - * @inheritDoc - */ - public function getIdentityType(): int - { - return $this->identityType; - } - - /** - * @inheritDoc - */ - public function getTypeId(): string - { - return $this->typeId; - } - - /** - * Field's resolver class name - * - * @return string - */ - public function getResolverClass(): string - { - return $this->resolverClass; - } -} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php b/app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php deleted file mode 100644 index 8bb4c11a056d5..0000000000000 --- a/app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php +++ /dev/null @@ -1,54 +0,0 @@ -isSafe = $isSafe; - parent::__construct($phrase, $cause, $code); - } - - /** - * @inheritdoc - */ - public function isClientSafe(): bool - { - return $this->isSafe; - } - - /** - * @inheritdoc - */ - public function getCategory(): string - { - return self::EXCEPTION_CATEGORY; - } -} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php b/app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php deleted file mode 100644 index aeec59e21f399..0000000000000 --- a/app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -request = $this->createMock(RequestInterface::class); - $this->identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->requestTypeExtractor = $this->createMock(RequestTypeExtractorInterface::class); - - $this->model = new BackpressureContextFactory( - $this->requestTypeExtractor, - $this->identityProvider, - $this->request - ); - } - - /** - * Verify that no context is available for empty request type. - * - * @return void - */ - public function testCreateForEmptyTypeReturnNull(): void - { - $this->requestTypeExtractor->method('extract')->willReturn(null); - - $this->assertNull($this->model->create($this->createField('test'))); - } - - /** - * Different identities. - * - * @return array - */ - public function getIdentityCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1' - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42' - ], - 'admin' => [ - ContextInterface::IDENTITY_TYPE_ADMIN, - '42' - ] - ]; - } - - /** - * Verify that identity is created for customers. - * - * @param int $identityType - * @param string $identity - * @return void - * @dataProvider getIdentityCases - */ - public function testCreateForIdentity(int $identityType, string $identity): void - { - $this->requestTypeExtractor->method('extract')->willReturn($typeId = 'test'); - $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); - $this->identityProvider->method('fetchIdentity')->willReturn($identity); - - /** @var GraphQlContext $context */ - $context = $this->model->create($this->createField($resolver = 'TestResolver')); - $this->assertNotNull($context); - $this->assertEquals($identityType, $context->getIdentityType()); - $this->assertEquals($identity, $context->getIdentity()); - $this->assertEquals($typeId, $context->getTypeId()); - $this->assertEquals($resolver, $context->getResolverClass()); - } - - /** - * Create Field instance. - * - * @param string $resolver - * @return Field - */ - private function createField(string $resolver): Field - { - $mock = $this->createMock(Field::class); - $mock->method('getResolver')->willReturn($resolver); - - return $mock; - } -} diff --git a/app/code/Magento/GraphQl/etc/di.xml b/app/code/Magento/GraphQl/etc/di.xml index 85a2636fdaba8..76bfb2118dc34 100644 --- a/app/code/Magento/GraphQl/etc/di.xml +++ b/app/code/Magento/GraphQl/etc/di.xml @@ -111,15 +111,4 @@ - - - - - Magento\GraphQl\Model\Backpressure\BackpressureFieldValidator - - - - - diff --git a/app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php b/app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php deleted file mode 100644 index 7c1ab32dbd979..0000000000000 --- a/app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php +++ /dev/null @@ -1,46 +0,0 @@ -configManager = $configManager; - } - - /** - * @inheritDoc - */ - public function extract(RequestInterface $request, ActionInterface $action): ?string - { - if ($action instanceof PlaceOrder && $this->configManager->isEnforcementEnabled()) { - return OrderLimitConfigManager::REQUEST_TYPE_ID; - } - - return null; - } -} diff --git a/app/code/Magento/InstantPurchase/etc/di.xml b/app/code/Magento/InstantPurchase/etc/di.xml index 40debf28e2540..def091d285da3 100644 --- a/app/code/Magento/InstantPurchase/etc/di.xml +++ b/app/code/Magento/InstantPurchase/etc/di.xml @@ -23,14 +23,4 @@ - - - - - - Magento\InstantPurchase\Model\BackpressureTypeExtractor - - - - diff --git a/app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php b/app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php deleted file mode 100644 index 10286d8453c85..0000000000000 --- a/app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php +++ /dev/null @@ -1,35 +0,0 @@ -isValueChanged()) { - $value = (int) $this->getValue(); - if ($value < 1) { - throw new LocalizedException(__('Number above 0 is required for the limit')); - } - } - - return $this; - } -} diff --git a/app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php b/app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php deleted file mode 100644 index 82df3ac0beb0f..0000000000000 --- a/app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php +++ /dev/null @@ -1,29 +0,0 @@ - ['value' => '60', 'label' => __('Minute')], - '3600' => ['value' => '3600', 'label' => __('Hour')], - '86400' => ['value' => '86400', 'label' => __('Day')] - ]; - } -} diff --git a/app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php b/app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php deleted file mode 100644 index da80bd96f7089..0000000000000 --- a/app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php +++ /dev/null @@ -1,76 +0,0 @@ -source = $source; - } - - /** - * @inheritDoc - * - * @throws LocalizedException - */ - public function beforeSave() - { - if ($this->isValueChanged()) { - $value = (string)$this->getValue(); - $availableValues = $this->source->toOptionArray(); - if (!array_key_exists($value, $availableValues)) { - throw new LocalizedException( - __( - 'Please select a valid rate limit period in seconds: %1', - implode(', ', array_keys($availableValues)) - ) - ); - } - } - - return $this; - } -} diff --git a/app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php b/app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php deleted file mode 100644 index e37504b0ac84c..0000000000000 --- a/app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php +++ /dev/null @@ -1,102 +0,0 @@ -config = $config; - } - - /** - * @inheritDoc - * - * @throws RuntimeException - */ - public function readLimit(ContextInterface $context): LimitConfig - { - switch ($context->getIdentityType()) { - case ContextInterface::IDENTITY_TYPE_ADMIN: - case ContextInterface::IDENTITY_TYPE_CUSTOMER: - $limit = $this->fetchAuthenticatedLimit(); - break; - case ContextInterface::IDENTITY_TYPE_IP: - $limit = $this->fetchGuestLimit(); - break; - default: - throw new RuntimeException(__("Identity type not found")); - } - - return new LimitConfig($limit, $this->fetchPeriod()); - } - - /** - * Checks if enforcement enabled for the current store - * - * @return bool - */ - public function isEnforcementEnabled(): bool - { - return $this->config->isSetFlag('sales/backpressure/enabled', ScopeInterface::SCOPE_STORE); - } - - /** - * Limit for authenticated customers - * - * @return int - */ - private function fetchAuthenticatedLimit(): int - { - return (int)$this->config->getValue('sales/backpressure/limit', ScopeInterface::SCOPE_STORE); - } - - /** - * Limit for guests - * - * @return int - */ - private function fetchGuestLimit(): int - { - return (int)$this->config->getValue( - 'sales/backpressure/guest_limit', - ScopeInterface::SCOPE_STORE - ); - } - - /** - * Counter reset period - * - * @return int - */ - private function fetchPeriod(): int - { - return (int)$this->config->getValue('sales/backpressure/period', ScopeInterface::SCOPE_STORE); - } -} diff --git a/app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php b/app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php deleted file mode 100644 index 09b6ea3cd5557..0000000000000 --- a/app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php +++ /dev/null @@ -1,49 +0,0 @@ -config = $config; - } - - /** - * @inheritDoc - */ - public function extract(string $service, string $method, string $endpoint): ?string - { - if (in_array($service, [CartManagementInterface::class, GuestCartManagementInterface::class]) - && $method === self::METHOD - && $this->config->isEnforcementEnabled() - ) { - return OrderLimitConfigManager::REQUEST_TYPE_ID; - } - - return null; - } -} diff --git a/app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php b/app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php deleted file mode 100644 index 93943b8eae76b..0000000000000 --- a/app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php +++ /dev/null @@ -1,124 +0,0 @@ -scopeConfigMock = $this->createMock(ScopeConfigInterface::class); - - $this->model = new OrderLimitConfigManager($this->scopeConfigMock); - } - - /** - * Different config variations. - * - * @return array - */ - public function getConfigCases(): array - { - return [ - 'guest' => [ContextInterface::IDENTITY_TYPE_IP, 100, 50, 60, 100, 60], - 'authed' => [ContextInterface::IDENTITY_TYPE_CUSTOMER, 100, 50, 3600, 50, 3600], - ]; - } - - /** - * Verify that limit config is read from store config. - * - * @param int $identityType - * @param int $guestLimit - * @param int $authLimit - * @param int $period - * @param int $expectedLimit - * @param int $expectedPeriod - * @return void - * @dataProvider getConfigCases - * @throws RuntimeException - */ - public function testReadLimit( - int $identityType, - int $guestLimit, - int $authLimit, - int $period, - int $expectedLimit, - int $expectedPeriod - ): void { - $context = $this->createMock(ContextInterface::class); - $context->method('getIdentityType')->willReturn($identityType); - - $this->scopeConfigMock->method('getValue') - ->willReturnMap( - [ - ['sales/backpressure/limit', 'store', null, $authLimit], - ['sales/backpressure/guest_limit', 'store', null, $guestLimit], - ['sales/backpressure/period', 'store', null, $period], - ] - ); - - $limit = $this->model->readLimit($context); - $this->assertEquals($expectedLimit, $limit->getLimit()); - $this->assertEquals($expectedPeriod, $limit->getPeriod()); - } - - /** - * Verify logic behind enabled check - * - * @param bool $enabled - * @param bool $expected - * @return void - * @dataProvider getEnabledCases - */ - public function testIsEnforcementEnabled( - bool $enabled, - bool $expected - ): void { - $this->scopeConfigMock->method('isSetFlag') - ->with('sales/backpressure/enabled') - ->willReturn($enabled); - - $this->assertEquals($expected, $this->model->isEnforcementEnabled()); - } - - /** - * Config variations for enabled check. - * - * @return array - */ - public function getEnabledCases(): array - { - return [ - 'disabled' => [false, false], - 'enabled' => [true, true], - ]; - } -} diff --git a/app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php b/app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php deleted file mode 100644 index b38072d40fa7f..0000000000000 --- a/app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php +++ /dev/null @@ -1,71 +0,0 @@ -configManagerMock = $this->createMock(OrderLimitConfigManager::class); - $this->typeExtractor = new WebapiRequestTypeExtractor($this->configManagerMock); - } - - /** - * Tests CompositeRequestTypeExtractor - * - * @param string $service - * @param string $method - * @param bool $isEnforcementEnabled - * @param mixed $expected - * @dataProvider dataProvider - */ - public function testExtract(string $service, string $method, bool $isEnforcementEnabled, $expected) - { - $this->configManagerMock->method('isEnforcementEnabled') - ->willReturn($isEnforcementEnabled); - - $this->assertEquals($expected, $this->typeExtractor->extract($service, $method, 'someEndPoint')); - } - - /** - * @return array[] - */ - public function dataProvider(): array - { - return [ - ['wrongService', 'wrongMethod', false, null], - [CartManagementInterface::class, 'wrongMethod', false, null], - [GuestCartManagementInterface::class, 'wrongMethod', false, null], - [GuestCartManagementInterface::class, 'placeOrder', false, null], - [GuestCartManagementInterface::class, 'placeOrder', true, 'quote-order'], - ]; - } -} diff --git a/app/code/Magento/Quote/etc/adminhtml/system.xml b/app/code/Magento/Quote/etc/adminhtml/system.xml index 044102ca5a183..6fc54f43c63fa 100644 --- a/app/code/Magento/Quote/etc/adminhtml/system.xml +++ b/app/code/Magento/Quote/etc/adminhtml/system.xml @@ -17,36 +17,5 @@ -
- - - - - Magento\Config\Model\Config\Source\Yesno - - - - Magento\Quote\Model\Backpressure\Config\LimitValue - - 1 - - - - - Magento\Quote\Model\Backpressure\Config\LimitValue - - 1 - - - - - Magento\Quote\Model\Backpressure\Config\PeriodSource - Magento\Quote\Model\Backpressure\Config\PeriodValue - - 1 - - - -
diff --git a/app/code/Magento/Quote/etc/config.xml b/app/code/Magento/Quote/etc/config.xml index c2be964b4eeec..c547e11c16357 100644 --- a/app/code/Magento/Quote/etc/config.xml +++ b/app/code/Magento/Quote/etc/config.xml @@ -12,13 +12,5 @@ 1 - - - 0 - 10 - 50 - 60 - - diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 496996d775413..5ffc82d05e20f 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -144,20 +144,4 @@ Enter a valid payment method and try again. - - - - - Magento\Quote\Model\Backpressure\OrderLimitConfigManager - - - - - - - - Magento\Quote\Model\Backpressure\WebapiRequestTypeExtractor - - - diff --git a/app/code/Magento/Quote/i18n/en_US.csv b/app/code/Magento/Quote/i18n/en_US.csv index 483b29a9fdbce..c8da332f729c8 100644 --- a/app/code/Magento/Quote/i18n/en_US.csv +++ b/app/code/Magento/Quote/i18n/en_US.csv @@ -70,7 +70,3 @@ Carts,Carts "Validated Vat Number","Validated Vat Number" "Invalid Quote Item id %1","Invalid Quote Item id %1" "Invalid quote address id %1","Invalid quote address id %1" -"Number above 0 is required for the limit","Number above 0 is required for the limit" -"Please select a valid rate limit period in seconds: %1.","Please select a valid rate limit period in seconds: %1." -"Identity type not found","Identity type not found" -"Invalid order backpressure limit config","Invalid order backpressure limit config" diff --git a/app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php b/app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php deleted file mode 100644 index 45dea83df88af..0000000000000 --- a/app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php +++ /dev/null @@ -1,62 +0,0 @@ -config = $config; - } - - /** - * @inheritDoc - */ - public function extract(Field $field): ?string - { - $fieldResolver = $this->resolver($field->getResolver()); - $placeOrderName = $this->resolver(PlaceOrder::class); - $setPaymentAndPlaceOrder = $this->resolver(SetPaymentAndPlaceOrder::class); - - if (($field->getResolver() === $setPaymentAndPlaceOrder || $placeOrderName === $fieldResolver) - && $this->config->isEnforcementEnabled() - ) { - return OrderLimitConfigManager::REQUEST_TYPE_ID; - } - - return null; - } - - /** - * Resolver to get exact class name - * - * @param string $class - * @return string - */ - private function resolver(string $class): string - { - return trim($class, '\\'); - } -} diff --git a/app/code/Magento/QuoteGraphQl/etc/di.xml b/app/code/Magento/QuoteGraphQl/etc/di.xml index 9ef81a2c39157..63eb001821c01 100644 --- a/app/code/Magento/QuoteGraphQl/etc/di.xml +++ b/app/code/Magento/QuoteGraphQl/etc/di.xml @@ -48,13 +48,4 @@ Magento\Quote\Api\ShippingMethodManagementInterface - - - - - Magento\QuoteGraphQl\Model\BackpressureRequestTypeExtractor - - - - diff --git a/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php b/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php index ed3073b256542..048c0d86bc312 100644 --- a/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php +++ b/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php @@ -3,23 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -declare(strict_types=1); namespace Magento\Webapi\Controller\Rest; -use Magento\Framework\App\Backpressure\BackpressureExceededException; -use Magento\Framework\App\BackpressureEnforcerInterface; -use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\AuthorizationException; use Magento\Framework\Webapi\Authorization; use Magento\Framework\Webapi\Rest\Request as RestRequest; use Magento\Store\Model\StoreManagerInterface; -use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; -use Magento\Framework\Webapi\Exception as WebapiException; -use Magento\Webapi\Controller\Rest\Router\Route; /** - * Validates a request + * This class is responsible for validating the request */ class RequestValidator { @@ -44,113 +37,55 @@ class RequestValidator private $authorization; /** - * @var BackpressureContextFactory - */ - private BackpressureContextFactory $backpressureContextFactory; - - /** - * @var BackpressureEnforcerInterface - */ - private BackpressureEnforcerInterface $backpressureEnforcer; - - /** + * Initialize dependencies + * * @param RestRequest $request * @param Router $router * @param StoreManagerInterface $storeManager * @param Authorization $authorization - * @param BackpressureContextFactory|null $backpressureContextFactory - * @param BackpressureEnforcerInterface|null $backpressureEnforcer */ public function __construct( RestRequest $request, Router $router, StoreManagerInterface $storeManager, - Authorization $authorization, - ?BackpressureContextFactory $backpressureContextFactory = null, - ?BackpressureEnforcerInterface $backpressureEnforcer = null + Authorization $authorization ) { $this->request = $request; $this->router = $router; $this->storeManager = $storeManager; $this->authorization = $authorization; - $this->backpressureContextFactory = $backpressureContextFactory - ?? ObjectManager::getInstance()->get(BackpressureContextFactory::class); - $this->backpressureEnforcer = $backpressureEnforcer - ?? ObjectManager::getInstance()->get(BackpressureEnforcerInterface::class); } /** - * Validates the request + * Validate request * * @throws AuthorizationException - * @throws WebapiException + * @throws \Magento\Framework\Webapi\Exception * @return void */ public function validate() { + $this->checkPermissions(); $route = $this->router->match($this->request); - $this->checkPermissions($route); - $this->onlyHttps($route); - $this->checkBackpressure($route); - } - - /** - * Perform authentication and authorization - * - * @param Route $route - * @return void - * @throws AuthorizationException - */ - private function checkPermissions(Route $route) - { - if ($this->authorization->isAllowed($route->getAclResources())) { - return; - } - - throw new AuthorizationException( - __( - "The consumer isn't authorized to access %resources.", - ['resources' => implode(', ', $route->getAclResources())] - ) - ); - } - - /** - * Checks if operation allowed only in HTTPS - * - * @param Route $route - * @throws WebapiException - */ - private function onlyHttps(Route $route) - { if ($route->isSecure() && !$this->request->isSecure()) { - throw new WebapiException(__('Operation allowed only in HTTPS')); + throw new \Magento\Framework\Webapi\Exception(__('Operation allowed only in HTTPS')); } } /** - * Checks backpressure + * Perform authentication and authorization. * - * @param Route $route - * @throws WebapiException + * @throws \Magento\Framework\Exception\AuthorizationException + * @return void */ - private function checkBackpressure(Route $route) + private function checkPermissions() { - $context = $this->backpressureContextFactory->create( - $route->getServiceClass(), - $route->getServiceMethod(), - $route->getRoutePath() - ); - if ($context) { - try { - $this->backpressureEnforcer->enforce($context); - } catch (BackpressureExceededException $exception) { - throw new WebapiException( - __('Too Many Requests'), - 0, - WebapiException::HTTP_TOO_MANY_REQUESTS - ); - } + $route = $this->router->match($this->request); + if (!$this->authorization->isAllowed($route->getAclResources())) { + $params = ['resources' => implode(', ', $route->getAclResources())]; + throw new AuthorizationException( + __("The consumer isn't authorized to access %resources.", $params) + ); } } } diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php index 2768b3fab5620..bc89565267d8a 100644 --- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php +++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php @@ -12,14 +12,11 @@ use Magento\Framework\Api\ExtensibleDataInterface; use Magento\Framework\Api\MetadataObjectInterface; use Magento\Framework\Api\SimpleDataObjectConverter; -use Magento\Framework\App\Backpressure\BackpressureExceededException; -use Magento\Framework\App\BackpressureEnforcerInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Webapi\Authorization; use Magento\Framework\Exception\AuthorizationException; use Magento\Framework\Reflection\DataObjectProcessor; -use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; use Magento\Framework\Webapi\ServiceInputProcessor; use Magento\Framework\Webapi\Request as WebapiRequest; use Magento\Framework\Webapi\Exception as WebapiException; @@ -30,9 +27,9 @@ use Magento\Webapi\Model\ServiceMetadata; /** - * Handler of requests to SOAP server + * Handler of requests to SOAP server. * - * The main responsibility is to instantiate proper action controller (service) and execute requested method on it + * The main responsibility is to instantiate proper action controller (service) and execute requested method on it. * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -85,22 +82,14 @@ class Handler */ private $paramsOverrider; - /** - * @var BackpressureContextFactory - */ - private BackpressureContextFactory $backpressureContextFactory; - - /** - * @var BackpressureEnforcerInterface - */ - private BackpressureEnforcerInterface $backpressureEnforcer; - /** * @var InputArraySizeLimitValue */ private $inputArraySizeLimitValue; /** + * Initialize dependencies. + * * @param WebapiRequest $request * @param ObjectManagerInterface $objectManager * @param SoapConfig $apiConfig @@ -111,8 +100,6 @@ class Handler * @param MethodsMap $methodsMapProcessor * @param ParamsOverrider|null $paramsOverrider * @param InputArraySizeLimitValue|null $inputArraySizeLimitValue - * @param BackpressureContextFactory|null $backpressureContextFactory - * @param BackpressureEnforcerInterface|null $backpressureEnforcer * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -125,9 +112,7 @@ public function __construct( DataObjectProcessor $dataObjectProcessor, MethodsMap $methodsMapProcessor, ?ParamsOverrider $paramsOverrider = null, - ?InputArraySizeLimitValue $inputArraySizeLimitValue = null, - ?BackpressureContextFactory $backpressureContextFactory = null, - ?BackpressureEnforcerInterface $backpressureEnforcer = null + ?InputArraySizeLimitValue $inputArraySizeLimitValue = null ) { $this->_request = $request; $this->_objectManager = $objectManager; @@ -138,16 +123,12 @@ public function __construct( $this->_dataObjectProcessor = $dataObjectProcessor; $this->methodsMapProcessor = $methodsMapProcessor; $this->paramsOverrider = $paramsOverrider ?? ObjectManager::getInstance()->get(ParamsOverrider::class); - $this->inputArraySizeLimitValue = $inputArraySizeLimitValue - ?? ObjectManager::getInstance()->get(InputArraySizeLimitValue::class); - $this->backpressureContextFactory = $backpressureContextFactory - ?? ObjectManager::getInstance()->get(BackpressureContextFactory::class); - $this->backpressureEnforcer = $backpressureEnforcer - ?? ObjectManager::getInstance()->get(BackpressureEnforcerInterface::class); + $this->inputArraySizeLimitValue = $inputArraySizeLimitValue ?? ObjectManager::getInstance() + ->get(InputArraySizeLimitValue::class); } /** - * Handler for all SOAP operations + * Handler for all SOAP operations. * * @param string $operation * @param array $arguments @@ -155,8 +136,6 @@ public function __construct( * @throws WebapiException * @throws \LogicException * @throws AuthorizationException - * phpcs:disable Magento2.Functions.DiscouragedFunction - * phpcs:disable Generic.PHP.NoSilencedErrors */ public function __call($operation, $arguments) { @@ -170,9 +149,6 @@ public function __call($operation, $arguments) throw new WebapiException(__("Operation allowed only in HTTPS")); } - //Backpressure enforcement - $this->backpressureEnforcement($serviceMethodInfo['class'], $serviceMethodInfo['method'], $operation); - if (!$this->authorization->isAllowed($serviceMethodInfo[ServiceMetadata::KEY_ACL_RESOURCES])) { throw new AuthorizationException( __( @@ -283,28 +259,4 @@ protected function _prepareResponseData($data, $serviceClassName, $serviceMethod } return [self::RESULT_NODE_NAME => $result]; } - - /** - * Backpressure enforcement - * - * @param string $class - * @param string $method - * @param string $operation - * @throws WebapiException - */ - private function backpressureEnforcement(string $class, string $method, string $operation) - { - $context = $this->backpressureContextFactory->create($class, $method, $operation); - if ($context) { - try { - $this->backpressureEnforcer->enforce($context); - } catch (BackpressureExceededException $exception) { - throw new WebapiException( - __('Too Many Requests'), - 0, - WebapiException::HTTP_TOO_MANY_REQUESTS - ); - } - } - } } diff --git a/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php b/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php index e25803af2536b..e0fc834f75eb3 100644 --- a/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php @@ -20,11 +20,9 @@ class RequestValidatorTest extends TestCase { - public const SERVICE_METHOD = 'testMethod'; + const SERVICE_METHOD = 'testMethod'; - public const SERVICE_ID = 'Magento\Webapi\Controller\Rest\TestService'; - - public const SERVICE_PATH = '/V1/test-service'; + const SERVICE_ID = 'Magento\Webapi\Controller\Rest\TestService'; /** * @var RequestValidator @@ -76,6 +74,7 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMock(); $this->routeMock = $this->getMockBuilder(Route::class) + ->setMethods(['isSecure', 'getServiceMethod', 'getServiceClass', 'getAclResources', 'getParameters']) ->disableOriginalConstructor() ->getMock(); $this->authorizationMock = $this->getMockBuilder(Authorization::class) @@ -101,7 +100,6 @@ protected function setUp(): void $this->routeMock->expects($this->any())->method('getServiceClass')->willReturn(self::SERVICE_ID); $this->routeMock->expects($this->any())->method('getServiceMethod') ->willReturn(self::SERVICE_METHOD); - $this->routeMock->expects($this->any())->method('getRoutePath')->willReturn(self::SERVICE_PATH); $routerMock->expects($this->any())->method('match')->willReturn($this->routeMock); parent::setUp(); diff --git a/app/code/Magento/Webapi/i18n/en_US.csv b/app/code/Magento/Webapi/i18n/en_US.csv index 36a2cce11d6bc..6384b3231d6b0 100644 --- a/app/code/Magento/Webapi/i18n/en_US.csv +++ b/app/code/Magento/Webapi/i18n/en_US.csv @@ -22,4 +22,3 @@ Message,Message "If empty, UTF-8 will be used.","If empty, UTF-8 will be used." "Web Services Configuration","Web Services Configuration" "REST and SOAP configurations, generated WSDL file","REST and SOAP configurations, generated WSDL file" -"Too Many Requests","Too Many Requests" diff --git a/app/etc/di.xml b/app/etc/di.xml index 099dd84d83e76..6056a54c66468 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -1784,9 +1784,6 @@ Magento\Framework\App\Request\HttpMethodValidator - - Magento\Framework\App\Request\BackpressureValidator - @@ -1979,27 +1976,5 @@ 999999 - - - - - - - - - - - - - - \Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php deleted file mode 100644 index 7bb3564b51859..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php +++ /dev/null @@ -1,40 +0,0 @@ -getResponse(); - return $response->representJson('{"str": "controller-read", "counter": ' .(++$this->counter) .'}'); - } - - public function resetCounter(): void - { - $this->counter = 0; - } - - public function getCounter(): int - { - return $this->counter; - } -} diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php deleted file mode 100644 index 5101e71cf9ee8..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - Magento\TestModuleControllerBackpressure\Model\TypeExtractor - - - - - - - - - Magento\TestModuleControllerBackpressure\Model\LimitConfigManager - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml deleted file mode 100644 index ac0313adf9f2d..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml deleted file mode 100644 index 87ef08c0e281a..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php deleted file mode 100644 index fa484c0a9f857..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php +++ /dev/null @@ -1,13 +0,0 @@ -getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleControllerBackpressure') === null) { - ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleControllerBackpressure', __DIR__); -} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php deleted file mode 100644 index 997d43ff32a29..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php +++ /dev/null @@ -1,24 +0,0 @@ -counter++; - - return ['str' => 'read']; - } - - public function resetCounter(): void - { - $this->counter = 0; - } - - public function getCounter(): int - { - return $this->counter; - } -} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php deleted file mode 100644 index cccc747dc6ba7..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php +++ /dev/null @@ -1,27 +0,0 @@ -getResolver() == TestServiceResolver::class) { - return 'testgraphqlbackpressure'; - } - - return null; - } -} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json deleted file mode 100644 index 0dd27bb7f9dd2..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "magento/module-test-graphql-backpressure", - "description": "test graphql module", - "config": { - "sort-packages": true - }, - "require": { - "php": "~7.4.0||~8.0.0", - "magento/framework": "*", - "magento/module-integration": "*" - }, - "type": "magento2-module", - "extra": { - "map": [ - [ - "*", - "Magento/TestModuleGraphQlBackpressure" - ] - ] - } -} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml deleted file mode 100644 index 41195dbc025fa..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - Magento\TestModuleGraphQlBackpressure\Model\TypeExtractor - - - - - - - - - Magento\TestModuleGraphQlBackpressure\Model\LimitConfigManager - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml deleted file mode 100644 index 4e286010bbebf..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml deleted file mode 100644 index edffb1f4a3535..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls deleted file mode 100644 index 28100445340e8..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright © Magento, Inc. All rights reserved. -# See COPYING.txt for license details. - -type TestReadOutput { - str: String -} - -type Query { - testGraphqlRead: TestReadOutput @resolver(class: "Magento\\TestModuleGraphQlBackpressure\\Model\\TestServiceResolver") @cache(cacheable: false) -} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php deleted file mode 100644 index 660fb27e91f13..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php +++ /dev/null @@ -1,13 +0,0 @@ -getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleGraphQlBackpressure') === null) { - ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleGraphQlBackpressure', __DIR__); -} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php deleted file mode 100644 index befec29700a95..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php +++ /dev/null @@ -1,17 +0,0 @@ -counter++; - - return 'read'; - } - - public function resetCounter(): void - { - $this->counter = 0; - } - - public function getCounter(): int - { - return $this->counter; - } -} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php deleted file mode 100644 index d2db29fc6e5f5..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - Magento\TestModuleWebapiBackpressure\Model\TypeExtractor - - - - - - - - - Magento\TestModuleWebapiBackpressure\Model\LimitConfigManager - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml deleted file mode 100644 index 8b4a777513130..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml deleted file mode 100644 index 265ea00cac212..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml deleted file mode 100644 index 0695a5db74285..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php deleted file mode 100644 index 7c69142380b7e..0000000000000 --- a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php +++ /dev/null @@ -1,13 +0,0 @@ -getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleWebapiBackpressure') === null) { - ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleWebapiBackpressure', __DIR__); -} diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php deleted file mode 100644 index 00964f5e1c5d9..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php +++ /dev/null @@ -1,119 +0,0 @@ -identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->webapiContextFactory = Bootstrap::getObjectManager()->create( - BackpressureContextFactory::class, - ['identityProvider' => $this->identityProvider] - ); - $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); - } - - /** - * Configured cases. - * - * @return array - */ - public function getConfiguredCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1', - GuestPaymentInformationManagementInterface::class, - 'savePaymentInformationAndPlaceOrder', - '/V1/guest-carts/:cartId/payment-information', - 50 - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42', - PaymentInformationManagementInterface::class, - 'savePaymentInformationAndPlaceOrder', - '/V1/carts/mine/payment-information', - 100 - ] - ]; - } - - /** - * Verify that backpressure is configured for guests. - * - * @param int $identityType - * @param string $identity - * @param string $service - * @param string $method - * @param string $endpoint - * @param int $expectedLimit - * @return void - * @dataProvider getConfiguredCases - * @magentoConfigFixture current_store sales/backpressure/enabled 1 - * @magentoConfigFixture current_store sales/backpressure/limit 100 - * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 - * @magentoConfigFixture current_store sales/backpressure/period 60 - */ - public function testConfigured( - int $identityType, - string $identity, - string $service, - string $method, - string $endpoint, - int $expectedLimit - ): void { - $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); - $this->identityProvider->method('fetchIdentity')->willReturn($identity); - - $context = $this->webapiContextFactory->create( - $service, - $method, - $endpoint - ); - $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); - - $limits = $this->limitConfigManager->readLimit($context); - $this->assertEquals($expectedLimit, $limits->getLimit()); - $this->assertEquals(60, $limits->getPeriod()); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php deleted file mode 100644 index bf7b485ebfcf6..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php +++ /dev/null @@ -1,53 +0,0 @@ -index = Bootstrap::getObjectManager()->get(Read::class); - $this->index->resetCounter(); - } - - /** - * Verify that backpressure is enforced for controllers. - * - * @return void - */ - public function testBackpressure(): void - { - $nOfReqs = 6; - - for ($i = 0; $i < $nOfReqs; $i++) { - $this->dispatch('testbackpressure/read/read'); - } - - $counter = json_decode($this->getResponse()->getBody(), true)['counter']; - $this->assertGreaterThan(0, $counter); - $this->assertLessThan($nOfReqs, $counter); - } -} diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php deleted file mode 100644 index ba26372132e63..0000000000000 --- a/dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php +++ /dev/null @@ -1,110 +0,0 @@ -identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->contextFactory = Bootstrap::getObjectManager()->create( - BackpressureContextFactory::class, - ['identityProvider' => $this->identityProvider] - ); - $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); - } - - /** - * Configured cases. - * - * @return array - */ - public function getConfiguredCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1', - SetPaymentAndPlaceOrder::class, - 50 - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42', - PlaceOrder::class, - 100 - ] - ]; - } - - /** - * Verify that backpressure is configured for guests. - * - * @param int $identityType - * @param string $identity - * @param string $resolver - * @param int $expectedLimit - * @return void - * @dataProvider getConfiguredCases - * @magentoConfigFixture current_store sales/backpressure/enabled 1 - * @magentoConfigFixture current_store sales/backpressure/limit 100 - * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 - * @magentoConfigFixture current_store sales/backpressure/period 60 - */ - public function testConfigured( - int $identityType, - string $identity, - string $resolver, - int $expectedLimit - ): void { - $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); - $this->identityProvider->method('fetchIdentity')->willReturn($identity); - - $field = $this->createMock(Field::class); - $field->method('getResolver')->willReturn($resolver); - $context = $this->contextFactory->create($field); - $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); - - $limits = $this->limitConfigManager->readLimit($context); - $this->assertEquals($expectedLimit, $limits->getLimit()); - $this->assertEquals(60, $limits->getPeriod()); - } -} diff --git a/dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php deleted file mode 100644 index ae4825a8ccc6a..0000000000000 --- a/dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php +++ /dev/null @@ -1,102 +0,0 @@ -identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->contextFactory = Bootstrap::getObjectManager()->create( - ContextFactory::class, - ['identityProvider' => $this->identityProvider] - ); - $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); - } - - /** - * Configured cases. - * - * @return array - */ - public function getConfiguredCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1', - 50 - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42', - 100 - ] - ]; - } - - /** - * Verify that backpressure is configured for guests. - * - * @param int $identityType - * @param string $identity - * @param int $expectedLimit - * @return void - * @dataProvider getConfiguredCases - * @magentoConfigFixture current_store sales/backpressure/enabled 1 - * @magentoConfigFixture current_store sales/backpressure/limit 100 - * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 - * @magentoConfigFixture current_store sales/backpressure/period 60 - */ - public function testConfigured( - int $identityType, - string $identity, - int $expectedLimit - ): void { - $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); - $this->identityProvider->method('fetchIdentity')->willReturn($identity); - - $context = $this->contextFactory->create($this->createMock(PlaceOrder::class)); - $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); - - $limits = $this->limitConfigManager->readLimit($context); - $this->assertEquals($expectedLimit, $limits->getLimit()); - $this->assertEquals(60, $limits->getPeriod()); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php deleted file mode 100644 index cb64b08da5260..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php +++ /dev/null @@ -1,119 +0,0 @@ -identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->webapiContextFactory = Bootstrap::getObjectManager()->create( - BackpressureContextFactory::class, - ['identityProvider' => $this->identityProvider] - ); - $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); - } - - /** - * Configured cases. - * - * @return array - */ - public function getConfiguredCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1', - GuestCartManagementInterface::class, - 'placeOrder', - '/V1/guest-carts/:cartId/order', - 50 - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42', - CartManagementInterface::class, - 'placeOrder', - '/V1/carts/mine/order', - 100 - ] - ]; - } - - /** - * Verify that backpressure is configured for guests. - * - * @param int $identityType - * @param string $identity - * @param string $service - * @param string $method - * @param string $endpoint - * @param int $expectedLimit - * @return void - * @dataProvider getConfiguredCases - * @magentoConfigFixture current_store sales/backpressure/enabled 1 - * @magentoConfigFixture current_store sales/backpressure/limit 100 - * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 - * @magentoConfigFixture current_store sales/backpressure/period 60 - */ - public function testConfigured( - int $identityType, - string $identity, - string $service, - string $method, - string $endpoint, - int $expectedLimit - ): void { - $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); - $this->identityProvider->method('fetchIdentity')->willReturn($identity); - - $context = $this->webapiContextFactory->create( - $service, - $method, - $endpoint - ); - $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); - - $limits = $this->limitConfigManager->readLimit($context); - $this->assertEquals($expectedLimit, $limits->getLimit()); - $this->assertEquals(60, $limits->getPeriod()); - } -} diff --git a/lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php b/lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php deleted file mode 100644 index c1a0412c805a5..0000000000000 --- a/lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php +++ /dev/null @@ -1,16 +0,0 @@ -configs = $configs; - } - - /** - * @inheritDoc - * - * @throws RuntimeException - */ - public function readLimit(ContextInterface $context): LimitConfig - { - if (isset($this->configs[$context->getTypeId()])) { - return $this->configs[$context->getTypeId()]->readLimit($context); - } - - throw new RuntimeException( - __( - 'Failed to find config manager for "%typeId".', - [ 'typeId' => $context->getTypeId()] - ) - ); - } -} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php deleted file mode 100644 index 137358f732b5d..0000000000000 --- a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -limit = $limit; - $this->period = $period; - } - - /** - * Requests per period - * - * @return int - */ - public function getLimit(): int - { - return $this->limit; - } - - /** - * Period in seconds - * - * @return int - */ - public function getPeriod(): int - { - return $this->period; - } -} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php deleted file mode 100644 index 94626a5874180..0000000000000 --- a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -redisClient = $redisClient; - $this->deploymentConfig = $deploymentConfig; - } - - /** - * @inheritDoc - */ - public function incrAndGetFor(ContextInterface $context, int $timeSlot, int $discardAfter): int - { - $id = $this->generateId($context, $timeSlot); - $this->redisClient->incrBy($id, 1); - $this->redisClient->expireAt($id, time() + $discardAfter); - - return (int)$this->redisClient->exec()[0]; - } - - /** - * @inheritDoc - */ - public function getFor(ContextInterface $context, int $timeSlot): ?int - { - $value = $this->redisClient->get($this->generateId($context, $timeSlot)); - - return $value ? (int)$value : null; - } - - /** - * Generate cache ID based on context - * - * @param ContextInterface $context - * @param int $timeSlot - * @return string - */ - private function generateId(ContextInterface $context, int $timeSlot): string - { - return $this->getPrefixId() - . $context->getTypeId() - . $context->getIdentityType() - . $context->getIdentity() - . $timeSlot; - } - - /** - * Returns prefix id - * - * @return string - */ - private function getPrefixId(): string - { - try { - return (string)$this->deploymentConfig->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, - self::DEFAULT_PREFIX_ID - ); - } catch (RuntimeException | FileSystemException $e) { - return self::DEFAULT_PREFIX_ID; - } - } -} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php deleted file mode 100644 index 3d1621927091d..0000000000000 --- a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php +++ /dev/null @@ -1,249 +0,0 @@ - '127.0.0.1', - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT => 6379, - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT => null, - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT => '', - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB => 3, - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD => null, - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER => null, - ]; - - /** - * Config map - */ - public const KEY_CONFIG_PATH_MAP = [ - self::KEY_HOST => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER, - self::KEY_PORT => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT, - self::KEY_TIMEOUT => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, - self::KEY_PERSISTENT => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, - self::KEY_DB => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB, - self::KEY_PASSWORD => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD, - self::KEY_USER => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER, - ]; - - /** - * @var Credis_Client - */ - private $pipeline; - - /** - * @param DeploymentConfig $config - * @throws FileSystemException - * @throws RuntimeException - */ - public function __construct(DeploymentConfig $config) - { - $credisClient = new Credis_Client( - $this->getHost($config), - $this->getPort($config), - $this->getTimeout($config), - $this->getPersistent($config), - $this->getDb($config), - $this->getPassword($config), - $this->getUser($config) - ); - - $this->pipeline = $credisClient->pipeline(); - } - - /** - * Increments given key value - * - * @param string $key - * @param int $decrement - * @return Credis_Client|int - */ - public function incrBy(string $key, int $decrement) - { - return $this->pipeline->incrBy($key, $decrement); - } - - /** - * Sets expiration date of the key - * - * @param string $key - * @param int $timestamp - * @return Credis_Client|int - */ - public function expireAt(string $key, int $timestamp) - { - return $this->pipeline->expireAt($key, $timestamp); - } - - /** - * Returns value by key - * - * @param string $key - * @return bool|Credis_Client|string - */ - public function get(string $key) - { - return $this->pipeline->get($key); - } - - /** - * Execute statement - * - * @return array - */ - public function exec(): array - { - return $this->pipeline->exec(); - } - - /** - * Returns Redis host - * - * @param DeploymentConfig $config - * @return string - * @throws FileSystemException - * @throws RuntimeException - */ - private function getHost(DeploymentConfig $config): string - { - return $config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER] - ); - } - - /** - * Returns Redis port - * - * @param DeploymentConfig $config - * @return int - * @throws FileSystemException - * @throws RuntimeException - */ - private function getPort(DeploymentConfig $config): int - { - return (int)$config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT] - ); - } - - /** - * Returns Redis timeout - * - * @param DeploymentConfig $config - * @return float|null - * @throws FileSystemException - * @throws RuntimeException - */ - private function getTimeout(DeploymentConfig $config): ?float - { - return (float)$config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT] - ); - } - - /** - * Returns Redis persistent - * - * @param DeploymentConfig $config - * @return string - * @throws FileSystemException - * @throws RuntimeException - */ - private function getPersistent(DeploymentConfig $config): string - { - return $config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT] - ); - } - - /** - * Returns Redis db - * - * @param DeploymentConfig $config - * @return int - * @throws FileSystemException - * @throws RuntimeException - */ - private function getDb(DeploymentConfig $config): int - { - return (int)$config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB] - ); - } - - /** - * Returns Redis password - * - * @param DeploymentConfig $config - * @return string|null - * @throws FileSystemException - * @throws RuntimeException - */ - private function getPassword(DeploymentConfig $config): ?string - { - return $config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD] - ); - } - - /** - * Returns Redis user - * - * @param DeploymentConfig $config - * @return string|null - * @throws FileSystemException - * @throws RuntimeException - */ - private function getUser(DeploymentConfig $config): ?string - { - return $config->get( - self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER, - self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER] - ); - } -} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php deleted file mode 100644 index 61ad16f8969fe..0000000000000 --- a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php +++ /dev/null @@ -1,53 +0,0 @@ -types = $types; - $this->objectManager = $objectManager; - } - - /** - * @inheritDoc - * - * @param string $type - * @return RequestLoggerInterface - * @throws RuntimeException - */ - public function create(string $type): RequestLoggerInterface - { - if (isset($this->types[$type])) { - return $this->objectManager->create($this->types[$type]); - } - - throw new RuntimeException(__('Invalid request logger type: %1', $type)); - } -} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php deleted file mode 100644 index e7475ef8b0891..0000000000000 --- a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -requestLoggerFactory = $requestLoggerFactory; - $this->configManager = $configManager; - $this->dateTime = $dateTime; - $this->deploymentConfig = $deploymentConfig; - $this->logger = $logger; - } - - /** - * @inheritDoc - * - * @throws FileSystemException - */ - public function enforce(ContextInterface $context): void - { - try { - $requestLogger = $this->getRequestLogger(); - $limit = $this->configManager->readLimit($context); - $time = $this->dateTime->gmtTimestamp(); - $remainder = $time % $limit->getPeriod(); - //Time slot is the ts of the beginning of the period - $timeSlot = $time - $remainder; - - $count = $requestLogger->incrAndGetFor( - $context, - $timeSlot, - $limit->getPeriod() * 3//keep data for at least last 3 time slots - ); - - if ($count <= $limit->getLimit()) { - //Try to compare to a % of requests from previous time slot - $prevCount = $requestLogger->getFor($context, $timeSlot - $limit->getPeriod()); - if ($prevCount != null) { - $count += $prevCount * (1 - ($remainder / $limit->getPeriod())); - } - } - if ($count > $limit->getLimit()) { - throw new BackpressureExceededException(); - } - } catch (RuntimeException $e) { - $this->logger->error('Backpressure sliding window not applied. ' . $e->getMessage()); - } - } - - /** - * Returns request logger - * - * @return RequestLoggerInterface - * @throws FileSystemException - * @throws RuntimeException - */ - private function getRequestLogger(): RequestLoggerInterface - { - return $this->requestLoggerFactory->create( - (string)$this->deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER) - ); - } -} diff --git a/lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php b/lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php deleted file mode 100644 index 94754ae9f4935..0000000000000 --- a/lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -extractors = $extractors; - } - - /** - * @inheritDoc - */ - public function extract(RequestInterface $request, ActionInterface $action): ?string - { - foreach ($this->extractors as $extractor) { - $type = $extractor->extract($request, $action); - if ($type) { - return $type; - } - } - - return null; - } -} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php b/lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php deleted file mode 100644 index af3d697a8fb9f..0000000000000 --- a/lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php +++ /dev/null @@ -1,72 +0,0 @@ -extractor = $extractor; - $this->identityProvider = $identityProvider; - $this->request = $request; - } - - /** - * Create context if possible - * - * @param ActionInterface $action - * @return ContextInterface|null - */ - public function create(ActionInterface $action): ?ContextInterface - { - $typeId = $this->extractor->extract($this->request, $action); - if ($typeId === null) { - return null; - } - - return new ControllerContext( - $this->request, - $this->identityProvider->fetchIdentity(), - $this->identityProvider->fetchIdentityType(), - $typeId, - $action - ); - } -} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php b/lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php deleted file mode 100644 index 7620c94daf464..0000000000000 --- a/lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php +++ /dev/null @@ -1,107 +0,0 @@ -request = $request; - $this->identity = $identity; - $this->identityType = $identityType; - $this->typeId = $typeId; - $this->action = $action; - } - - /** - * @inheritDoc - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * @inheritDoc - */ - public function getIdentity(): string - { - return $this->identity; - } - - /** - * @inheritDoc - */ - public function getIdentityType(): int - { - return $this->identityType; - } - - /** - * @inheritDoc - */ - public function getTypeId(): string - { - return $this->typeId; - } - - /** - * Controller instance - * - * @return ActionInterface - */ - public function getAction(): ActionInterface - { - return $this->action; - } -} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php b/lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php deleted file mode 100644 index 443628b6a0b53..0000000000000 --- a/lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -contextFactory = $contextFactory; - $this->enforcer = $enforcer; - $this->appState = $appState; - } - - /** - * @inheritDoc - * - * @throws LocalizedException - */ - public function validate(RequestInterface $request, ActionInterface $action): void - { - if ($request instanceof HttpRequest - && in_array($this->getAreaCode(), [Area::AREA_FRONTEND, Area::AREA_ADMINHTML], true) - ) { - $context = $this->contextFactory->create($action); - if ($context) { - try { - $this->enforcer->enforce($context); - } catch (BackpressureExceededException $exception) { - throw new LocalizedException(__('Too Many Requests'), $exception); - } - } - } - } - - /** - * Returns area code - * - * @return string|null - */ - private function getAreaCode(): ?string - { - try { - return $this->appState->getAreaCode(); - } catch (LocalizedException $exception) { - return null; - } - } -} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php deleted file mode 100644 index e2cfc00e6d495..0000000000000 --- a/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php +++ /dev/null @@ -1,92 +0,0 @@ -redisClientMock = $this->createMock(RedisClient::class); - $this->deploymentConfigMock = $this->createMock(DeploymentConfig::class); - $this->deploymentConfigMock->method('get') - ->with('backpressure/logger/id-prefix', 'reqlog') - ->willReturn('custompref_'); - $this->contextMock = $this->createMock(ContextInterface::class); - $this->contextMock->method('getTypeId') - ->willReturn('typeId_'); - $this->contextMock->method('getIdentityType') - ->willReturn(2); - $this->contextMock->method('getIdentity') - ->willReturn('_identity_'); - - $this->redisRequestLogger = new RedisRequestLogger( - $this->redisClientMock, - $this->deploymentConfigMock - ); - } - - public function testIncrAndGetFor() - { - $expectedId = 'custompref_typeId_2_identity_400'; - - $this->redisClientMock->method('incrBy') - ->with($expectedId, 1); - $this->redisClientMock->method('expireAt') - ->with($expectedId, time() + 500); - $this->redisClientMock->method('exec') - ->willReturn(['45']); - - self::assertEquals( - 45, - $this->redisRequestLogger->incrAndGetFor($this->contextMock, 400, 500) - ); - } - - public function testGetFor() - { - $expectedId = 'custompref_typeId_2_identity_600'; - $this->redisClientMock->method('get') - ->with($expectedId) - ->willReturn('23'); - - self::assertEquals(23, $this->redisRequestLogger->getFor($this->contextMock, 600)); - } -} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php deleted file mode 100644 index 30eace104f6c2..0000000000000 --- a/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php +++ /dev/null @@ -1,231 +0,0 @@ -requestLoggerMock = $this->createMock(RequestLoggerInterface::class); - $this->requestLoggerFactoryMock = $this->createMock(RequestLoggerFactoryInterface::class); - $this->limitConfigManagerMock = $this->createMock(LimitConfigManagerInterface::class); - $this->dateTimeMock = $this->createMock(DateTime::class); - $deploymentConfigMock = $this->createMock(DeploymentConfig::class); - $this->loggerMock = $this->createMock(LoggerInterface::class); - - $deploymentConfigMock->method('get') - ->with('backpressure/logger/type') - ->willReturn('someRequestType'); - $this->requestLoggerFactoryMock->method('create') - ->with('someRequestType') - ->willReturn($this->requestLoggerMock); - - $this->model = new SlidingWindowEnforcer( - $this->requestLoggerFactoryMock, - $this->limitConfigManagerMock, - $this->dateTimeMock, - $deploymentConfigMock, - $this->loggerMock - ); - } - - /** - * Verify no exception when under limit with no previous record. - * - * @return void - */ - public function testEnforcingUnderLimitPasses(): void - { - $time = time(); - $limitPeriod = 60; - $limit = 1000; - $curSlot = $time - ($time % $limitPeriod); - $prevSlot = $curSlot - $limitPeriod; - - $this->dateTimeMock->method('gmtTimestamp')->willReturn($time); - - $this->initConfigMock($limit, $limitPeriod); - - $this->requestLoggerMock->method('incrAndGetFor') - ->willReturnCallback( - function (...$args) use ($curSlot, $limitPeriod, $limit) { - $this->assertEquals($curSlot, $args[1]); - $this->assertGreaterThan($limitPeriod, $args[2]); - - return ((int)$limit / 2); - } - ); - $this->requestLoggerMock->method('getFor') - ->willReturnCallback( - function (...$args) use ($prevSlot) { - $this->assertEquals($prevSlot, $args[1]); - - return null; - } - ); - - $this->model->enforce($this->createContext()); - } - - /** - * Cases for sliding window algo test. - * - * @return array - */ - public function getSlidingCases(): array - { - return [ - 'prev-lt-50%' => [999, false], - 'prev-eq-50%' => [1000, false], - 'prev-gt-50%' => [1001, true] - ]; - } - - /** - * Verify that sliding window algo works. - * - * @param int $prevCounter - * @param bool $expectException - * @return void - * @throws FileSystemException - * @throws RuntimeException - * @dataProvider getSlidingCases - */ - public function testEnforcingSlided(int $prevCounter, bool $expectException): void - { - $limitPeriod = 60; - $limit = 1000; - $time = time(); - $curSlot = $time - ($time % $limitPeriod); - $prevSlot = $curSlot - $limitPeriod; - //50% of the period passed - $time = $curSlot + ((int)($limitPeriod / 2)); - $this->dateTimeMock->method('gmtTimestamp')->willReturn($time); - - $this->initConfigMock($limit, $limitPeriod); - - $this->requestLoggerMock->method('incrAndGetFor') - ->willReturnCallback( - function () use ($limit) { - return ((int)$limit / 2); - } - ); - $this->requestLoggerMock->method('getFor') - ->willReturnCallback( - function (...$args) use ($prevCounter, $prevSlot) { - $this->assertEquals($prevSlot, $args[1]); - - return $prevCounter; - } - ); - - if ($expectException) { - $this->expectException(BackpressureExceededException::class); - } - - $this->model->enforce($this->createContext()); - } - - /** - * Create context instance for tests. - * - * @return ContextInterface - */ - private function createContext(): ContextInterface - { - $mock = $this->createMock(ContextInterface::class); - $mock->method('getRequest')->willReturn($this->createMock(RequestInterface::class)); - $mock->method('getIdentity')->willReturn('127.0.0.1'); - $mock->method('getIdentityType')->willReturn(ContextInterface::IDENTITY_TYPE_IP); - $mock->method('getTypeId')->willReturn('test'); - - return $mock; - } - - /** - * Initialize config reader mock. - * - * @param int $limit - * @param int $limitPeriod - * @return void - */ - private function initConfigMock(int $limit, int $limitPeriod): void - { - $configMock = $this->createMock(LimitConfig::class); - $configMock->method('getPeriod')->willReturn($limitPeriod); - $configMock->method('getLimit')->willReturn($limit); - $this->limitConfigManagerMock->method('readLimit')->willReturn($configMock); - } - - /** - * Invalid type of request logger - */ - public function testRequestLoggerTypeIsInvalid() - { - $this->requestLoggerFactoryMock->method('create') - ->with('wrong-type') - ->willThrowException(new RuntimeException(__('Invalid request logger type: %1', 'wrong-type'))); - $this->loggerMock->method('error') - ->with('Invalid request logger type: %1', 'wrong-type'); - } -} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php deleted file mode 100644 index 7e95505efae91..0000000000000 --- a/lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php +++ /dev/null @@ -1,130 +0,0 @@ -request = $this->createMock(RequestInterface::class); - $this->identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->requestTypeExtractor = $this->createMock(RequestTypeExtractorInterface::class); - - $this->model = new ContextFactory( - $this->requestTypeExtractor, - $this->identityProvider, - $this->request - ); - } - - /** - * Verify that no context is available for empty request type. - * - * @return void - */ - public function testCreateForEmptyTypeReturnNull(): void - { - $this->requestTypeExtractor->method('extract')->willReturn(null); - - $this->assertNull($this->model->create($this->createAction())); - } - - /** - * Different identities. - * - * @return array - */ - public function getIdentityCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1', - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42' - ], - 'admin' => [ - ContextInterface::IDENTITY_TYPE_ADMIN, - '42' - ] - ]; - } - - /** - * Verify that identity is created for customers. - * - * @param int $userType - * @param string $userId - * @return void - * @dataProvider getIdentityCases - */ - public function testCreateForIdentity( - int $userType, - string $userId - ): void { - $this->requestTypeExtractor->method('extract')->willReturn($typeId = 'test'); - $this->identityProvider->method('fetchIdentityType')->willReturn($userType); - $this->identityProvider->method('fetchIdentity')->willReturn($userId); - - /** @var ControllerContext $context */ - $context = $this->model->create($action = $this->createAction()); - $this->assertNotNull($context); - $this->assertEquals($userType, $context->getIdentityType()); - $this->assertEquals($userId, $context->getIdentity()); - $this->assertEquals($typeId, $context->getTypeId()); - $this->assertEquals($action, $context->getAction()); - } - - /** - * Create Action instance. - * - * @return ActionInterface - */ - private function createAction(): ActionInterface - { - return $this->createMock(ActionInterface::class); - } -} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php b/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php deleted file mode 100644 index e82f5a2dca918..0000000000000 --- a/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php +++ /dev/null @@ -1,75 +0,0 @@ -request = $request; - $this->identityProvider = $identityProvider; - $this->extractor = $extractor; - } - - /** - * Create context if possible for current request - * - * @param string $service Service class - * @param string $method Service method - * @param string $endpoint Endpoint - * @return ContextInterface|null - */ - public function create(string $service, string $method, string $endpoint): ?ContextInterface - { - $typeId = $this->extractor->extract($service, $method, $endpoint); - if ($typeId === null) { - return null; - } - - return new RestContext( - $this->request, - $this->identityProvider->fetchIdentity(), - $this->identityProvider->fetchIdentityType(), - $typeId, - $service, - $method, - $endpoint - ); - } -} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php b/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php deleted file mode 100644 index da6201eb03548..0000000000000 --- a/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -extractors = $extractors; - } - - /** - * @inheritDoc - */ - public function extract(string $service, string $method, string $endpoint): ?string - { - foreach ($this->extractors as $extractor) { - $type = $extractor->extract($service, $method, $endpoint); - if ($type) { - return $type; - } - } - - return null; - } -} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php b/lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php deleted file mode 100644 index 333483093cb56..0000000000000 --- a/lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php +++ /dev/null @@ -1,142 +0,0 @@ -request = $request; - $this->identity = $identity; - $this->identityType = $identityType; - $this->typeId = $typeId; - $this->service = $service; - $this->method = $method; - $this->endpoint = $endpoint; - } - - /** - * @inheritDoc - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * @inheritDoc - */ - public function getIdentity(): string - { - return $this->identity; - } - - /** - * @inheritDoc - */ - public function getIdentityType(): int - { - return $this->identityType; - } - - /** - * @inheritDoc - */ - public function getTypeId(): string - { - return $this->typeId; - } - - /** - * Service class name - * - * @return string - */ - public function getService(): string - { - return $this->service; - } - - /** - * Service method - * - * @return string - */ - public function getMethod(): string - { - return $this->method; - } - - /** - * Endpoint route - * - * @return string - */ - public function getEndpoint(): string - { - return $this->endpoint; - } -} diff --git a/lib/internal/Magento/Framework/Webapi/Exception.php b/lib/internal/Magento/Framework/Webapi/Exception.php index 8abe46db78804..23d8317527722 100644 --- a/lib/internal/Magento/Framework/Webapi/Exception.php +++ b/lib/internal/Magento/Framework/Webapi/Exception.php @@ -1,8 +1,11 @@ request = $this->createMock(RequestInterface::class); - $this->identityProvider = $this->createMock(IdentityProviderInterface::class); - $this->requestTypeExtractor = $this->createMock(BackpressureRequestTypeExtractorInterface::class); - - $this->model = new BackpressureContextFactory( - $this->request, - $this->identityProvider, - $this->requestTypeExtractor - ); - } - - /** - * Verify that no context is available for empty request type. - * - * @return void - */ - public function testCreateForEmptyTypeReturnNull(): void - { - $this->requestTypeExtractor->method('extract')->willReturn(null); - - $this->assertNull($this->model->create('SomeService', 'method', '/api/route')); - } - - /** - * Different identities. - * - * @return array - */ - public function getIdentityCases(): array - { - return [ - 'guest' => [ - ContextInterface::IDENTITY_TYPE_IP, - '127.0.0.1' - ], - 'customer' => [ - ContextInterface::IDENTITY_TYPE_CUSTOMER, - '42' - ], - 'admin' => [ - ContextInterface::IDENTITY_TYPE_ADMIN, - '42' - ] - ]; - } - - /** - * Verify that identity is created for customers. - * - * @param int $identityType - * @param string $identity - * @return void - * @dataProvider getIdentityCases - */ - public function testCreateForIdentity(int $identityType, string $identity): void - { - $this->requestTypeExtractor->method('extract')->willReturn($typeId = 'test'); - $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); - $this->identityProvider->method('fetchIdentity')->willReturn($identity); - - /** @var RestContext $context */ - $context = $this->model->create($service ='SomeService', $method = 'method', $path = '/api/route'); - $this->assertNotNull($context); - $this->assertEquals($identityType, $context->getIdentityType()); - $this->assertEquals($identity, $context->getIdentity()); - $this->assertEquals($typeId, $context->getTypeId()); - $this->assertEquals($service, $context->getService()); - $this->assertEquals($method, $context->getMethod()); - $this->assertEquals($path, $context->getEndpoint()); - } -} diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php deleted file mode 100644 index 94b81005ed183..0000000000000 --- a/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php +++ /dev/null @@ -1,82 +0,0 @@ -extractorMock = $this->getMockForAbstractClass( - BackpressureRequestTypeExtractorInterface::class - ); - - $this->compositeRequestTypeExtractor = new CompositeRequestTypeExtractor( - array_fill(0, 3, $this->extractorMock) - ); - } - - /** - * Tests CompositeRequestTypeExtractor - */ - public function testExtract() - { - $this->extractorMock->expects($this->exactly(2)) - ->method('extract') - ->with('someService', 'someMethod', 'someEndpoint') - ->willReturnOnConsecutiveCalls(null, 'someType'); - - $this->assertEquals( - 'someType', - $this->compositeRequestTypeExtractor->extract( - 'someService', - 'someMethod', - 'someEndpoint' - ) - ); - } - - /** - * Tests CompositeRequestTypeExtractor when type - */ - public function testExtractTypeNotFound() - { - $this->extractorMock->expects($this->exactly(3)) - ->method('extract') - ->with('someService', 'someMethod', 'someEndpoint') - ->willReturn(null); - $this->assertEquals( - null, - $this->compositeRequestTypeExtractor->extract( - 'someService', - 'someMethod', - 'someEndpoint' - ) - ); - } -} diff --git a/setup/src/Magento/Setup/Model/ConfigModel.php b/setup/src/Magento/Setup/Model/ConfigModel.php index 0d52a7a3870c9..0abb8fa07c70e 100644 --- a/setup/src/Magento/Setup/Model/ConfigModel.php +++ b/setup/src/Magento/Setup/Model/ConfigModel.php @@ -143,7 +143,7 @@ public function validate(array $inputOptions) $option->validate($inputValue); } } catch (\InvalidArgumentException $e) { - $errors[] = [$e->getMessage()]; + $errors[] = $e->getMessage(); } } diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList.php b/setup/src/Magento/Setup/Model/ConfigOptionsList.php index d1a24f9cc5177..a1179daeb94e3 100644 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList.php +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList.php @@ -54,7 +54,6 @@ class ConfigOptionsList implements ConfigOptionsListInterface \Magento\Setup\Model\ConfigOptionsList\PageCache::class, \Magento\Setup\Model\ConfigOptionsList\Lock::class, \Magento\Setup\Model\ConfigOptionsList\Directory::class, - \Magento\Setup\Model\ConfigOptionsList\BackpressureLogger::class, ]; /** diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php b/setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php deleted file mode 100644 index 744e24f596bdf..0000000000000 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php +++ /dev/null @@ -1,295 +0,0 @@ - - self::INPUT_KEY_BACKPRESSURE_LOGGER, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_SERVER, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PORT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_DB, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PASSWORD, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER => - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_USER, - RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX => - self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX, - ]; - - /** - * @var RedisConnectionValidator - */ - private RedisConnectionValidator $redisValidator; - - /** - * @param RedisConnectionValidator $redisValidator - */ - public function __construct(RedisConnectionValidator $redisValidator) - { - $this->redisValidator = $redisValidator; - } - - /** - * @inheritDoc - */ - public function getOptions() - { - return [ - new SelectConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER, - SelectConfigOption::FRONTEND_WIZARD_SELECT, - self::VALID_BACKPRESSURE_LOGGER_OPTIONS, - RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER, - 'Backpressure logger handler' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_SERVER, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER, - 'Redis server' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PORT, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT, - 'Redis server listen port' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, - 'Redis server timeout' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, - 'Redis persistent' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_DB, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB, - 'Redis db number' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PASSWORD, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD, - 'Redis server password' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_USER, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER, - 'Redis server user' - ), - new TextConfigOption( - self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX, - TextConfigOption::FRONTEND_WIZARD_TEXT, - RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, - 'ID prefix for keys' - ), - ]; - } - - /** - * @inheritDoc - * - * @throws FileSystemException|RuntimeException; - */ - public function createConfig(array $options, DeploymentConfig $deploymentConfig) - { - $configData = new ConfigData(ConfigFilePool::APP_ENV); - - foreach (self::CONFIG_PATH_TO_INPUT_KEY_MAP as $configPath => $inputKey) { - switch ($inputKey) { - case self::INPUT_KEY_BACKPRESSURE_LOGGER: - $this->configureRequestLogger($options, $configData, $deploymentConfig); - break; - case self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX: - $this->configureIdPrefix($options, $configData, $deploymentConfig); - break; - default: - if (isset($options[$inputKey])) { - $configData->set($configPath, $options[$inputKey]); - } elseif ($deploymentConfig->get($configPath)) { - $configData->set($configPath, $deploymentConfig->get($configPath)); - } - } - } - - return $configData; - } - - /** - * Configures the request logger - * - * @param array $options - * @param ConfigData $configData - * @param DeploymentConfig $deploymentConfig - * @throws FileSystemException - * @throws RuntimeException - */ - private function configureRequestLogger(array $options, ConfigData $configData, DeploymentConfig $deploymentConfig) - { - $requestLoggerType = $options[self::INPUT_KEY_BACKPRESSURE_LOGGER] - ?? $deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER); - - if (RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS !== $requestLoggerType) { - return; - } - - $configData->set( - RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER, - RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS - ); - - foreach (RedisClient::DEFAULT_REDIS_CONFIG_VALUES as $configPath => $value) { - if (!$deploymentConfig->get($configPath)) { - $configData->set($configPath, $value); - } - } - } - - /** - * Configures the id prefix - * - * @param array $options - * @param ConfigData $configData - * @param DeploymentConfig $deploymentConfig - * @throws FileSystemException - * @throws RuntimeException - */ - private function configureIdPrefix(array $options, ConfigData $configData, DeploymentConfig $deploymentConfig) - { - if (isset($options[self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX])) { - $configData->set( - RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, - $options[self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX] - ); - return; - } - - $criteria = !$deploymentConfig->get(RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX) - && ( - $deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER) - || isset($options[self::INPUT_KEY_BACKPRESSURE_LOGGER]) - ); - - if ($criteria) { - $configData->set(RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, $this->generatePrefix()); - } - } - - /** - * @inheritDoc - * - * @throws FileSystemException - * @throws RuntimeException - */ - public function validate(array $options, DeploymentConfig $deploymentConfig) - { - $loggerType = $options[self::INPUT_KEY_BACKPRESSURE_LOGGER] - ?? $deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER); - - if ($loggerType) { - if (RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS === $loggerType) { - return !$this->validateRedisConfig($options, $deploymentConfig) - ? ['Invalid Redis configuration. Could not connect to Redis server.'] - : []; - } - - return ["Invalid backpressure request logger type: '{$loggerType}'"]; - } - - return []; - } - - /** - * Validate that Redis connection succeeds for given configuration - * - * @param array $options - * @param DeploymentConfig $deploymentConfig - * @return bool - * @throws FileSystemException - * @throws RuntimeException - */ - private function validateRedisConfig(array $options, DeploymentConfig $deploymentConfig): bool - { - $config = []; - foreach (RedisClient::KEY_CONFIG_PATH_MAP as $key => $configPath) { - $config[$key] = $options[self::CONFIG_PATH_TO_INPUT_KEY_MAP[$configPath]] - ?? $deploymentConfig->get( - $configPath, - RedisClient::DEFAULT_REDIS_CONFIG_VALUES[$configPath] ?? null - ); - } - - return $this->redisValidator->isValidConnection($config); - } - - /** - * Generate default cache ID prefix based on installation dir - * - * @return string - */ - private function generatePrefix(): string - { - // phpcs:ignore Magento2.Functions.DiscouragedFunction - return substr(\hash('sha256', dirname(__DIR__, 6)), 0, 3) . '_'; - } -} diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php deleted file mode 100644 index 98084b3c219b9..0000000000000 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php +++ /dev/null @@ -1,268 +0,0 @@ -validatorMock = $this->createMock(RedisConnectionValidator::class); - $this->deploymentConfigMock = $this->createMock(DeploymentConfig::class); - - $this->configList = new BackpressureLogger($this->validatorMock); - } - - /** - * testGetOptions - */ - public function testGetOptions() - { - $options = $this->configList->getOptions(); - $this->assertCount(9, $options); - $this->assertArrayHasKey(0, $options); - $this->assertInstanceOf(SelectConfigOption::class, $options[0]); - $this->assertEquals('backpressure-logger', $options[0]->getName()); - - $this->assertArrayHasKey(1, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[1]); - $this->assertEquals('backpressure-logger-redis-server', $options[1]->getName()); - - $this->assertArrayHasKey(2, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[2]); - $this->assertEquals('backpressure-logger-redis-port', $options[2]->getName()); - - $this->assertArrayHasKey(3, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[3]); - $this->assertEquals('backpressure-logger-redis-timeout', $options[3]->getName()); - - $this->assertArrayHasKey(4, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[4]); - $this->assertEquals('backpressure-logger-redis-persistent', $options[4]->getName()); - - $this->assertArrayHasKey(5, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[5]); - $this->assertEquals('backpressure-logger-redis-db', $options[5]->getName()); - - $this->assertArrayHasKey(6, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[6]); - $this->assertEquals('backpressure-logger-redis-password', $options[6]->getName()); - - $this->assertArrayHasKey(7, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[7]); - $this->assertEquals('backpressure-logger-redis-user', $options[7]->getName()); - - $this->assertArrayHasKey(8, $options); - $this->assertInstanceOf(TextConfigOption::class, $options[8]); - $this->assertEquals('backpressure-logger-id-prefix', $options[8]->getName()); - } - - /** - * testCreateConfigCacheRedis - * @dataProvider dataProviderCreateConfigCacheRedis - */ - public function testCreateConfigCacheRedis( - array $options, - array $deploymentConfigReturnMap, - array $expectedConfigData - ) { - $this->deploymentConfigMock->method('get')->willReturnMap($deploymentConfigReturnMap); - $configData = $this->configList->createConfig($options, $this->deploymentConfigMock); - $this->assertEquals($expectedConfigData, $configData->getData()); - } - - /** - * @return array[] - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function dataProviderCreateConfigCacheRedis(): array - { - return [ - 'minimum options' => [ - 'options' => ['backpressure-logger' => 'redis'], - 'deploymentConfigReturnMap' => [ - ['backpressure/logger/options/server', null, null], - ['backpressure/logger/options/port', null, null], - ['backpressure/logger/options/timeout', null, null], - ['backpressure/logger/options/persistent', null, null], - ['backpressure/logger/options/db', null, null], - ['backpressure/logger/options/password', null, null], - ['backpressure/logger/options/user', null, null], - ['backpressure/logger/id-prefix', null, null], - ], - 'expected-config-data' => [ - 'backpressure' => [ - 'logger' => [ - 'type' => 'redis', - 'options' => [ - 'server' => '127.0.0.1', - 'port' => 6379, - 'db' => 3, - 'password' => null, - 'timeout' => null, - 'persistent' => '', - 'user' => null - ], - 'id-prefix' => $this->expectedIdPrefix() - ] - ] - ], - ], - 'maximum options' => [ - 'options' => [ - 'backpressure-logger' => 'redis', - 'backpressure-logger-redis-server' => '', - 'backpressure-logger-redis-port' => 3344, - 'backpressure-logger-redis-timeout' => 5, - 'backpressure-logger-redis-persistent' => '', - 'backpressure-logger-redis-db' => 23, - 'backpressure-logger-redis-password' => '', - 'backpressure-logger-redis-user' => '', - 'backpressure-logger-id-prefix' => '', - ], - 'deploymentConfigReturnMap' => [ - ['backpressure/logger/type', null, null], - ['backpressure/logger/options/server', null, null], - ['backpressure/logger/options/port', null, null], - ['backpressure/logger/options/timeout', null, null], - ['backpressure/logger/options/persistent', null, null], - ['backpressure/logger/options/db', null, null], - ['backpressure/logger/options/password', null, null], - ['backpressure/logger/options/user', null, null], - ['backpressure/logger/id-prefix', null, null], - ], - 'expected-config-data' => [ - 'backpressure' => [ - 'logger' => [ - 'type' => 'redis', - 'options' => [ - 'server' => '', - 'port' => 3344, - 'db' => 23, - 'password' => '', - 'timeout' => 5, - 'persistent' => '', - 'user' => '', - ], - 'id-prefix' => '' - ] - ] - ], - ], - 'update options' => [ - 'options' => [ - 'backpressure-logger' => 'redis', - 'backpressure-logger-redis-server' => '', - 'backpressure-logger-redis-port' => 4433, - 'backpressure-logger-redis-timeout' => 2, - 'backpressure-logger-redis-persistent' => '', - 'backpressure-logger-redis-db' => 23, - 'backpressure-logger-redis-password' => '', - 'backpressure-logger-redis-user' => '', - 'backpressure-logger-id-prefix' => '', - ], - 'deploymentConfigReturnMap' => [ - ['backpressure/logger/type', null, 'redis'], - ['backpressure/logger/options/server', null, ''], - ['backpressure/logger/options/port', null, 3344], - ['backpressure/logger/options/timeout', null, 5], - ['backpressure/logger/options/persistent' => ''], - ['backpressure/logger/options/db', null, 43], - ['backpressure/logger/options/password', null, ''], - ['backpressure/logger/options/user', null, ''], - ['backpressure/logger/id-prefix', null, ''], - ], - 'expected-config-data' => [ - 'backpressure' => [ - 'logger' => [ - 'type' => 'redis', - 'options' => [ - 'server' => '', - 'port' => 4433, - 'db' => 23, - 'password' => '', - 'timeout' => 2, - 'persistent' => '', - 'user' => '', - ], - 'id-prefix' => '' - ] - ] - ], - ], - 'update-part-of-configuration' => [ - 'options' => [ - 'backpressure-logger-redis-port' => 4433, - 'backpressure-logger-redis-timeout' => 2, - 'backpressure-logger-redis-password' => '', - 'backpressure-logger-redis-user' => '', - 'backpressure-logger-id-prefix' => '', - ], - 'deploymentConfigReturnMap' => [ - ['backpressure/logger/type', null, 'redis'], - ['backpressure/logger/options/server', null, ''], - ['backpressure/logger/options/port', null, 3344], - ['backpressure/logger/options/timeout', null, 5], - ['backpressure/logger/options/persistent', null, ''], - ['backpressure/logger/options/db', null, 43], - ['backpressure/logger/options/password', null, ''], - ['backpressure/logger/options/user', null, ''], - ['backpressure/logger/id-prefix', null, ''], - ], - 'expected-config-data' => [ - 'backpressure' => [ - 'logger' => [ - 'type' => 'redis', - 'options' => [ - 'server' => '', - 'port' => 4433, - 'db' => 43, - 'password' => '', - 'timeout' => 2, - 'persistent' => '', - 'user' => '', - ], - 'id-prefix' => '' - ] - ] - ], - ] - ]; - } - - /** - * The default ID prefix, based on installation directory - * - * @return string - */ - private function expectedIdPrefix(): string - { - return substr(\hash('sha256', dirname(__DIR__, 8)), 0, 3) . '_'; - } -} From 7252681b068d0841605a3c7de787b6ebbe2a8975 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Thu, 16 Feb 2023 13:58:16 +0530 Subject: [PATCH 044/277] AC-6695: Guest Checkout Fix --- app/code/Magento/Checkout/etc/adminhtml/system.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index 63ca976cd1907..5bb0f37f3bc25 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -28,7 +28,7 @@
- \Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions + Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions From 65daac82f505a6e93277bcdcb240d5e6761a137d Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" Date: Fri, 17 Feb 2023 10:15:14 +0530 Subject: [PATCH 045/277] AC-6695: Guest Checkout Fix --- .../SubscribeEmailToNewsletterTest.php | 23 +++++++++++++++---- .../Controller/Subscriber/NewActionTest.php | 15 +++++++++++- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/Customer/SubscribeEmailToNewsletterTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/Customer/SubscribeEmailToNewsletterTest.php index ec0e49cc55153..17c18521f2a2c 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/Customer/SubscribeEmailToNewsletterTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/Customer/SubscribeEmailToNewsletterTest.php @@ -8,11 +8,14 @@ namespace Magento\GraphQl\Newsletter\Customer; use Exception; +use Magento\Customer\Model\AccountManagement; use Magento\Customer\Model\CustomerAuthUpdate; use Magento\Customer\Model\CustomerRegistry; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Exception\AuthenticationException; use Magento\Integration\Api\CustomerTokenServiceInterface; use Magento\Newsletter\Model\ResourceModel\Subscriber as SubscriberResourceModel; +use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQlAbstract; @@ -40,6 +43,10 @@ class SubscribeEmailToNewsletterTest extends GraphQlAbstract * @var SubscriberResourceModel */ private $subscriberResource; + /** + * @var ScopeConfigInterface + */ + private $scopeConfig; /** * @inheritDoc @@ -47,6 +54,7 @@ class SubscribeEmailToNewsletterTest extends GraphQlAbstract protected function setUp(): void { $objectManager = Bootstrap::getObjectManager(); + $this->scopeConfig = $objectManager->get(ScopeConfigInterface::class); $this->customerAuthUpdate = Bootstrap::getObjectManager()->get(CustomerAuthUpdate::class); $this->customerRegistry = Bootstrap::getObjectManager()->get(CustomerRegistry::class); $this->customerTokenService = $objectManager->get(CustomerTokenServiceInterface::class); @@ -146,10 +154,17 @@ public function testNewsletterSubscriptionWithAnotherCustomerEmail() { $query = $this->getQuery('customer2@search.example.com'); - $this->expectException(Exception::class); - $this->expectExceptionMessage('Cannot create a newsletter subscription.' . "\n"); - - $this->graphQlMutation($query, [], '', $this->getHeaderMap('customer@search.example.com')); + $guestLoginConfig = $this->scopeConfig->getValue( + AccountManagement::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_WEBSITE, + 1 + ); + + if ($guestLoginConfig) { + $this->expectException(Exception::class); + $this->expectExceptionMessage('Cannot create a newsletter subscription.' . "\n"); + $this->graphQlMutation($query, [], '', $this->getHeaderMap('customer@search.example.com')); + } } /** diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php index 63670e9cb458d..f0c5ce25911f4 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php @@ -8,12 +8,15 @@ namespace Magento\Newsletter\Controller\Subscriber; use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\AccountManagement; use Magento\Customer\Model\Session; use Magento\Customer\Model\Url; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Request\Http as HttpRequest; use Magento\Newsletter\Model\ResourceModel\Subscriber as SubscriberResource; use Magento\Newsletter\Model\ResourceModel\Subscriber\CollectionFactory; use Magento\Newsletter\Model\ResourceModel\Subscriber\Grid\Collection as GridCollection; +use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\TestCase\AbstractController; use Laminas\Stdlib\Parameters; @@ -222,8 +225,18 @@ public function testWithEmailAssignedToAnotherCustomer(): void $this->session->loginById(1); $this->prepareRequest('customer2@search.example.com'); $this->dispatch('newsletter/subscriber/new'); + $scopeConfig = $this->_objectManager->get(ScopeConfigInterface::class); + $guestLoginConfig = $scopeConfig->getValue( + AccountManagement::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG, + ScopeInterface::SCOPE_WEBSITE, + 1 + ); - $this->performAsserts('This email address is already assigned to another user.'); + if ($guestLoginConfig) { + $this->performAsserts('This email address is already assigned to another user.'); + } else { + $this->performAsserts('This email address is already subscribed.'); + } } /** From 7fb0ec423882b4ea880aa070d1b4298f991633fd Mon Sep 17 00:00:00 2001 From: magento packaging service Date: Thu, 23 Feb 2023 14:13:29 +0000 Subject: [PATCH 046/277] Updating composer versions for version-setter for 2.4.6 --- app/code/Magento/AdminAnalytics/composer.json | 24 ++++--- .../Magento/AdminNotification/composer.json | 24 ++++--- .../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 | 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/OpenSearch/composer.json | 22 +++--- app/code/Magento/PageCache/composer.json | 22 +++--- app/code/Magento/Payment/composer.json | 30 ++++---- 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 +-- 223 files changed, 2851 insertions(+), 2413 deletions(-) diff --git a/app/code/Magento/AdminAnalytics/composer.json b/app/code/Magento/AdminAnalytics/composer.json index e2f2bb182422d..72407e4f4c119 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.5", "require": { "php": "~8.1.0||~8.2.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 1354cc202d7d2..a3f2d07f63b65 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.5", "require": { "php": "~8.1.0||~8.2.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/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index 9ba5c58657f4f..c52092b56c3d7 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.6", "require": { "php": "~8.1.0||~8.2.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 289207e2fa1c4..222f9c3da97cf 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.4", "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": "~8.1.0||~8.2.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 2382864a4c4f5..61263c423890e 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.3", "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": "~8.1.0||~8.2.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 d52a4dc2a98a4..8ee1b7d91960a 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": "~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.6", + "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" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/AsynchronousOperations/composer.json b/app/code/Magento/AsynchronousOperations/composer.json index 7efcf27821405..d14d785f22d44 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.6", "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": "~8.1.0||~8.2.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 268db947994fe..3b3596bfa1ba8 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.6", "require": { "php": "~8.1.0||~8.2.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 9b9d55c18140a..d97c11964c946 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.4", "require": { "php": "~8.1.0||~8.2.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 a3d6c48757c9a..3ce10ba96ff3d 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.6", "require": { "php": "~8.1.0||~8.2.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 2f7a82e9a5c82..c1f6610fe9852 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.6", "require": { "php": "~8.1.0||~8.2.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 35972c3ba10de..7e99f30969451 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.6", "require": { "php": "~8.1.0||~8.2.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 7d29641125a37..22720d7f795aa 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": "~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.6", + "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" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json index d7a59a1795ff6..7a4855c5749f3 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.5", "require": { "php": "~8.1.0||~8.2.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 6c635ea103b0c..eba6b087ca446 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.4", "require": { "php": "~8.1.0||~8.2.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 0c39d988ba740..5d9e4d28c489d 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.6", "require": { "php": "~8.1.0||~8.2.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 a6bc6bd72afd6..d1c56d6e8bd10 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.4", "require": { "php": "~8.1.0||~8.2.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 4421b2991266b..4b0cd01d6bc26 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.6", "require": { "php": "~8.1.0||~8.2.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 2710625d0f08d..a1f7f80748319 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": "~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.3", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/CatalogCmsGraphQl/composer.json b/app/code/Magento/CatalogCmsGraphQl/composer.json index d1cff1a3e448f..7168091a40cfd 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.2", "require": { "php": "~8.1.0||~8.2.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 5c4a301857c7e..d99751e54e243 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": "~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.5", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/CatalogGraphQl/composer.json b/app/code/Magento/CatalogGraphQl/composer.json index fbc4172226c58..b863dec6df3a5 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.6", "require": { "php": "~8.1.0||~8.2.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 41b2b5f72ce7b..70dfae04fc488 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.6", "require": { "php": "~8.1.0||~8.2.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 7ea00923ac715..8f7416de33e89 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.6", "require": { "php": "~8.1.0||~8.2.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 58d567bc0706e..4c45fd6319edf 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": "~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.3", + "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" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index dc9c51dade87f..bbb58e9cca811 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.6", "require": { "php": "~8.1.0||~8.2.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 8b6569ba9fec4..02fa1e01e9831 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.5", "require": { "php": "~8.1.0||~8.2.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 c22ba277d57d9..d6af5d0916f72 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.3", "require": { "php": "~8.1.0||~8.2.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 7ccdb99d2c9d1..cb1a3c3c13928 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.6", "require": { "php": "~8.1.0||~8.2.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 6df0042d40648..fdf8b4df854c3 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.6", "require": { "php": "~8.1.0||~8.2.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 c3917a517a68d..3879b426cc935 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.4", "require": { "php": "~8.1.0||~8.2.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 b54b27474787b..9c51b4f00d30e 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.6", "require": { "php": "~8.1.0||~8.2.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 4d24d27e676ee..b0356991fd9a0 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.6", "require": { "php": "~8.1.0||~8.2.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 44d0e86bd78f2..d98b307b84b84 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.5", "require": { "php": "~8.1.0||~8.2.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 c0c1853eb4324..9ece75204f615 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.2", "require": { "php": "~8.1.0||~8.2.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 aa972d0a711a7..3ecd43c3163a3 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.6", "require": { "php": "~8.1.0||~8.2.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 07b7261823d92..4786af8a02866 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.3", "require": { "php": "~8.1.0||~8.2.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 0521f77f9bb7f..fa24885c1525b 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.5", "require": { "php": "~8.1.0||~8.2.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 2687ad032e000..c949f41846a07 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.4", "require": { "php": "~8.1.0||~8.2.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 9193e30061619..2b56700b83293 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": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*" - }, "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-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 8ad286bd667b5..603162f317bb3 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.6", "require": { "php": "~8.1.0||~8.2.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 f56cfd6299ad2..31f941a4b1ce2 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.4", "require": { "php": "~8.1.0||~8.2.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 8a9e4e50ad194..2b773ff0b5309 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.6", "require": { "php": "~8.1.0||~8.2.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 43c297de656c5..ab16ff4fc8e65 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": "~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.6", + "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" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json index 909c2ff967f41..50cbe3edf6696 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.3", "require": { "php": "~8.1.0||~8.2.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 68b5bb4c9a6da..1d5dbc3ede6a2 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.5", "require": { "php": "~8.1.0||~8.2.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 d2f1a87594a3c..85ec34011ac33 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.6", "require": { "php": "~8.1.0||~8.2.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 1696588920015..bd3a43dcb04b2 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.6", "require": { "php": "~8.1.0||~8.2.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 f2e69e7a7ec63..0cce60de63026 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.5", "require": { "php": "~8.1.0||~8.2.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 8c2325b39d508..638b26ea8ef91 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.4", "require": { "php": "~8.1.0||~8.2.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 ef2047644759b..726be45cd66e9 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.6", "require": { "php": "~8.1.0||~8.2.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 d02051d5148cd..802a1fa00ebd1 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": "~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.3", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/CustomerDownloadableGraphQl/composer.json b/app/code/Magento/CustomerDownloadableGraphQl/composer.json index 99e2f94da4081..219a8b479ac92 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.2", "require": { "php": "~8.1.0||~8.2.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 5967d2e9f8ac7..bfabb6edb885b 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": "~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.6", + "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" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index 09eb16c1d8a01..d08647f46ea02 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.6", "require": { "php": "~8.1.0||~8.2.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 c90a64299e8e5..68f2aa0acce2e 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.6", "require": { "php": "~8.1.0||~8.2.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 3f75c5bef7d44..06333f6a17873 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.6", "require": { "php": "~8.1.0||~8.2.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 26b8546164965..3a07467a8823b 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.5", "require": { "php": "~8.1.0||~8.2.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 a2538a6378d5b..8aba070e1ca81 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.6", "require": { "php": "~8.1.0||~8.2.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 082fa8ae742c1..bc7d04030135e 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": "~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.4", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index abd6479f10e2d..a0094c60698a9 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.6", "require": { "php": "~8.1.0||~8.2.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 c286438b49356..6875fa9572c27 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.6", "require": { "php": "~8.1.0||~8.2.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 bc35e44944c91..1d9d0935cb3ef 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.5", "require": { "php": "~8.1.0||~8.2.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 40d249ba472b9..a65b0a0ea5ca5 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.6", "require": { "php": "~8.1.0||~8.2.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 a19a8bc3d5109..5e187295d726b 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.3", "require": { "php": "~8.1.0||~8.2.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 714890fd5f452..bb4a095808871 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.6", "require": { "php": "~8.1.0||~8.2.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 || ~8.5.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/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json index 89f41bf14b0dc..3c793b31575d6 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.6", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "^7.17", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*" + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-search": "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" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index 27b33acfe00db..347f91b155c68 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.6", "require": { "php": "~8.1.0||~8.2.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 43a61d210ed74..8cfa6778ae68f 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.4", "require": { "php": "~8.1.0||~8.2.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 c3e879ac31177..2e5ecec26ab10 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.4", "require": { "php": "~8.1.0||~8.2.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 be0cdbbe22911..07aca6fb886b3 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.5", "require": { "php": "~8.1.0||~8.2.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 143b02439966f..fd0a85478e9bc 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.4", "require": { "php": "~8.1.0||~8.2.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 a9d5b9178bb85..b9774878989a7 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.3", "require": { "php": "~8.1.0||~8.2.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 09d9cadf97658..f36a7de32d535 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.2", "require": { "php": "~8.1.0||~8.2.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 ed6e245b4e955..d4213065f39f6 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.1", "require": { "php": "~8.1.0||~8.2.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 0192f363b61c2..eaad1a005eaa3 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.5", "require": { "php": "~8.1.0||~8.2.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 af1fe042c6df5..2e02286e3af94 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.6", "require": { "php": "~8.1.0||~8.2.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": "^15.0" }, "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 082534290d139..34db5ffafcfb2 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": "~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.3", + "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" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/GroupedCatalogInventory/composer.json b/app/code/Magento/GroupedCatalogInventory/composer.json index 487fdfe0cc828..9ded78d413e21 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.3", "require": { "php": "~8.1.0||~8.2.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 21805741bca44..f6b1613b79a70 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.4", "require": { "php": "~8.1.0||~8.2.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 8277efc44f06b..90c014b878640 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.6", "require": { "php": "~8.1.0||~8.2.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 41254569da53b..c506dff0dc317 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": "~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.6", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index 8ea56d1011582..81f0ad7fca8ed 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.6", "require": { "php": "~8.1.0||~8.2.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 8cee48610c7ea..52d9a5591a41b 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.6", "require": { "php": "~8.1.0||~8.2.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 d64f757adfd3b..d78743c07689d 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.5", "require": { "php": "~8.1.0||~8.2.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 a6eea5321de74..907ad94b4bd91 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.6", "require": { "php": "~8.1.0||~8.2.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 d3bb5db7439fb..dcbdc89cfb718 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.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "web-token/jwt-framework": "^3.1.2" }, - "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 ff1ae2bda5261..25fe8834cd471 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.1", "require": { "php": "~8.1.0||~8.2.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 c40f906eac3a0..daec6732a0664 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.6", "require": { "php": "~8.1.0||~8.2.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 6b2cbf7c1f3f7..2b2eb25250d41 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": "~8.1.0||~8.2.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.6", + "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.*" + }, + "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 2a42d814be498..77602ffdedc2c 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": "~8.1.0||~8.2.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.6", + "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.*" + }, + "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 fed3ab5390597..63253d6b4bded 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": "~8.1.0||~8.2.0", - "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/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 32e351bee5115..16ed3e854c6bf 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": "~8.1.0||~8.2.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.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-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 7c7767e23c27a..95517fd0a48c9 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.5", + "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,3 +22,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerGraphQl/composer.json b/app/code/Magento/LoginAsCustomerGraphQl/composer.json index ee97cd320115e..6e08392b27273 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": "~8.1.0||~8.2.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.3", + "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.*" + }, + "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 7e39d22d23ef6..370a4d90c51d8 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": "~8.1.0||~8.2.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.4", + "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.*" + }, + "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 39b8217c89969..010b5c8624eae 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": "~8.1.0||~8.2.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.5", + "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.*" + }, + "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 0ce4d008d1fd8..e2008d68abf76 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": "~8.1.0||~8.2.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.4", + "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.*" + }, + "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 74f74eb34432e..612142f813453 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": "~8.1.0||~8.2.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.5", + "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.*" + }, + "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 1827499160587..dbcf651910aa9 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.4", "require": { "php": "~8.1.0||~8.2.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 4e7fd39b9d0ae..4a78525082875 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": "~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.4", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaContentApi/composer.json b/app/code/Magento/MediaContentApi/composer.json index f7583a1f61a08..0ef247d0ccd37 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": "~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.5", + "require": { + "php": "~8.1.0||~8.2.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 948cc9f05d3cd..2c352d9987c5b 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": "~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.4", + "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" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/MediaContentCms/composer.json b/app/code/Magento/MediaContentCms/composer.json index a0a6098993900..2071dc0c3868b 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": "~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.4", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaContentSynchronization/composer.json b/app/code/Magento/MediaContentSynchronization/composer.json index 4520f1302a03f..0532ddaddfaa2 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": "~8.1.0||~8.2.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.5", + "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.*" + }, + "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 1e44b8079e29b..84a80b90a6e25 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": "~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.4", + "require": { + "php": "~8.1.0||~8.2.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 f3a2bbb4baeb1..444dcd3a95e9f 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": "~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.3", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaContentSynchronizationCms/composer.json b/app/code/Magento/MediaContentSynchronizationCms/composer.json index 9925cc9ae5387..0f68ec4a4a02b 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": "~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.3", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaGallery/composer.json b/app/code/Magento/MediaGallery/composer.json index 0076013351e22..2019f89a6d43d 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": "~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.5", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryApi/composer.json b/app/code/Magento/MediaGalleryApi/composer.json index 48ef4dbf076f3..3d20fc5770ab5 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": "~8.1.0||~8.2.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "101.0.5", + "require": { + "php": "~8.1.0||~8.2.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 7feea28221df4..d1d90aa5db83a 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": "~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.3", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/composer.json b/app/code/Magento/MediaGalleryCatalogIntegration/composer.json index 267c37e88b44e..532ca881b2efe 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": "~8.1.0||~8.2.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.3", + "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.*" + }, + "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 46f0de7c6a51b..4c4619171cc3a 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": "~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.3", + "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" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryCmsUi/composer.json b/app/code/Magento/MediaGalleryCmsUi/composer.json index 04e7f24199775..9ab26ba78468e 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": "~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.3", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryIntegration/composer.json b/app/code/Magento/MediaGalleryIntegration/composer.json index 3c0fd77facb76..781da96b1cf94 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": "~8.1.0||~8.2.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.5", + "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.*" + }, + "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 aede5537f058b..f41f7c39d9629 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": "~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.4", + "require": { + "php": "~8.1.0||~8.2.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 41de71aeb5265..d7f33e6ec76f4 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": "~8.1.0||~8.2.0", - "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/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 ca05a594554a6..4709b2c8b0729 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": "~8.1.0||~8.2.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.4", + "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.*" + }, + "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 e6f9cf747690f..990171e9696e1 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": "~8.1.0||~8.2.0", - "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/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 ee7b9b5be5b89..0f7598adde956 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": "~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.5", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaGallerySynchronizationApi/composer.json b/app/code/Magento/MediaGallerySynchronizationApi/composer.json index 7b62a0d7c680f..c746823cc40fa 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": "~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.4", + "require": { + "php": "~8.1.0||~8.2.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 ba4cec8bd6da9..466080c2fb1dd 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": "~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.2", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryUi/composer.json b/app/code/Magento/MediaGalleryUi/composer.json index d5caac3ff409e..6911017121adb 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": "~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.5", + "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" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryUiApi/composer.json b/app/code/Magento/MediaGalleryUiApi/composer.json index 9c6aa225fa058..e6b0795d5b066 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": "~8.1.0||~8.2.0", - "magento/framework": "*" - }, - "suggest": { - "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.*" + }, + "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 f58c5d9b808c3..14e38db53967d 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.5", "require": { "php": "~8.1.0||~8.2.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 7a297574ec8b2..55745d6d28450 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.6", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", "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" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index 1614f33d6c20c..5a50521cb99b3 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.5", "require": { "php": "~8.1.0||~8.2.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 c58e77c047b2d..548f9c97db545 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.3", "require": { "php": "~8.1.0||~8.2.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 1dea4b9949058..2926d4333b409 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.3", "require": { "php": "~8.1.0||~8.2.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 3ea9380da0809..b301b3721a8f9 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.6", "require": { "php": "~8.1.0||~8.2.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 b164a3b63aad4..f417cd6a2159a 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.4", "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": "~8.1.0||~8.2.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 e98f914082fab..5dd88e8932c2a 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.4", "require": { "php": "~8.1.0||~8.2.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 c477f8ecb64e3..8ab27ae53880f 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.6", "require": { "php": "~8.1.0||~8.2.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 3fe7f7aaf289a..aa6f167e0d730 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.3", "require": { "php": "~8.1.0||~8.2.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 09de8b66996ad..b21419adb01e7 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.4", "require": { "php": "~8.1.0||~8.2.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 9e75d64075f84..55e6cead59ad9 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.5", "require": { "php": "~8.1.0||~8.2.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/OpenSearch/composer.json b/app/code/Magento/OpenSearch/composer.json index 1b9e006b9e9b1..5ebdea5086f99 100644 --- a/app/code/Magento/OpenSearch/composer.json +++ b/app/code/Magento/OpenSearch/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-open-search", "description": "N/A", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-elasticsearch": "*", - "magento/module-search": "*", - "magento/module-config": "*", - "opensearch-project/opensearch-php": "^1.0 || ^2.0" - }, "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-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-elasticsearch": "101.0.*", + "magento/module-search": "101.1.*", + "magento/module-config": "101.2.*", + "opensearch-project/opensearch-php": "^1.0 || ^2.0" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index 494b5918004d8..4b00d23104b5d 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.6", "require": { "php": "~8.1.0||~8.2.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 36cd77ea50d47..99e6bb36489b9 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-payment", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.6", "require": { "php": "~8.1.0||~8.2.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/module-vault": "*" + "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/module-vault": "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/PaymentGraphQl/composer.json b/app/code/Magento/PaymentGraphQl/composer.json index e6ab6fc747768..0315acfc5c734 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.1", "require": { "php": "~8.1.0||~8.2.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 23ebf05f2f2bc..3882394b32435 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.6", "require": { "php": "~8.1.0||~8.2.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 8c9feff31e823..f661efcb75bd1 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.3", "require": { "php": "~8.1.0||~8.2.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 ce916276dac97..0104492e2742b 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.4", "require": { "php": "~8.1.0||~8.2.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 5a8ff5d7f3d5f..f4a4a48eb0107 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.6", "require": { "php": "~8.1.0||~8.2.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 aee755e6a00b0..5ae5834286fc8 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.5", "require": { "php": "~8.1.0||~8.2.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 55b8cb5efa14b..2476d5beeb45c 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.6", "require": { "php": "~8.1.0||~8.2.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 1552e71351af7..507b1e7d64b5b 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.6", "require": { "php": "~8.1.0||~8.2.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 c9e9254aa7968..6f9a31399dd9e 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": "~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.5", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/QuoteBundleOptions/composer.json b/app/code/Magento/QuoteBundleOptions/composer.json index 2412e9d23b329..6beb274f8883c 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": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "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-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 35dee93c0b12a..f5e853208c6e6 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": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "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-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 47030735c6081..2224d2b663370 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": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "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-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 24cb1382634c2..298a036d76a35 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.6", "require": { "php": "~8.1.0||~8.2.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 9c03a5b18f644..bce199f696105 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.3", "require": { "php": "~8.1.0||~8.2.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 4ddab4217f32e..a60f5f94535f0 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": "~8.1.0||~8.2.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.4", + "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.*" + }, + "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 107ddf6788fe2..2310aa5ce3d32 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.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "league/flysystem": "^2.4", "league/flysystem-aws-s3-v3": "^2.4" }, "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 887a9bc1730e3..1d0a0ca59470d 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.6", "require": { "php": "~8.1.0||~8.2.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 a8dec7db61404..ca3ae524cd9d0 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.2", "require": { "php": "~8.1.0||~8.2.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 e6ef2f416962c..110b3a0509be5 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.6", "require": { "php": "~8.1.0||~8.2.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 7939e3e475668..559ee484e68a3 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": "~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.3", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/ReviewGraphQl/composer.json b/app/code/Magento/ReviewGraphQl/composer.json index e31bb53d3dafc..cf74e40853a6a 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.2", "require": { "php": "~8.1.0||~8.2.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 37c984daa0089..eddc3169d79f5 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.2", "require": { "php": "~8.1.0||~8.2.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 436c956a56313..20305590b5a32 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.4", "require": { "php": "~8.1.0||~8.2.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 c39cfa4aa88d6..6983fcca47d76 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.5", "require": { "php": "~8.1.0||~8.2.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 e0ea835d63087..08bdee5cd5268 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.6", "require": { "php": "~8.1.0||~8.2.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 943fbf3e7ef07..de43645eb649d 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": "~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.3", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/SalesGraphQl/composer.json b/app/code/Magento/SalesGraphQl/composer.json index 7215c8fefa8eb..11a25c9d67a66 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": "~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.6", + "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" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json index ad11c308042fb..c5cd0f756f26f 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.3", "require": { "php": "~8.1.0||~8.2.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 89fd6cb64b89b..e816fda085c9b 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.6", "require": { "php": "~8.1.0||~8.2.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 c00dae5f5b62d..1e61a432fa3d0 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.3", "require": { "php": "~8.1.0||~8.2.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 bccca4714b922..66529ba4f1139 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.4", "require": { "php": "~8.1.0||~8.2.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 ed0779d3d7698..0938f0653e1de 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.6", "require": { "php": "~8.1.0||~8.2.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 0a2910591517d..80347cfaaec8d 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.6", "require": { "php": "~8.1.0||~8.2.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 7ffc4924f2495..fa1943b15df51 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.4", "require": { "php": "~8.1.0||~8.2.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 6abc8d6baf202..51a6bb18e73af 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": "~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.2", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index 0347a97e755d7..168a401db3ce5 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.6", "require": { "php": "~8.1.0||~8.2.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 3323abebdebac..1eb477d18b991 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.5", "require": { "php": "~8.1.0||~8.2.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 c4c195e45c138..f9504158c6ff5 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.6", "require": { "php": "~8.1.0||~8.2.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 f5fd98fdc4cae..7407ac0d5ce1e 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": "~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.4", + "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" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json index fb357a01e22c0..bd65f6fdc1cb7 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.5", "require": { "php": "~8.1.0||~8.2.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 ea2b06ed681f9..d5f79df9c7356 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.2", "require": { "php": "~8.1.0||~8.2.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 b02a3e031b1ae..eeee8bbd4560b 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.2", "require": { "php": "~8.1.0||~8.2.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 91f3d59016f7a..6274be644d726 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.6", "require": { "php": "~8.1.0||~8.2.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 744ed81435c34..04f891ccf2805 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.4", "require": { "php": "~8.1.0||~8.2.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 ff8ea5715b944..caa4a3ec723e6 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.2", "require": { "php": "~8.1.0||~8.2.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 fd7a5a075998e..62ef30507b0f3 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.6", "require": { "php": "~8.1.0||~8.2.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 fef2c01d039da..ed7fd41912bb3 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.2", "require": { "php": "~8.1.0||~8.2.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 2f7d6737e9596..216ee652d7a44 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.5", "require": { "php": "~8.1.0||~8.2.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 658a856db5fc2..cd8eee7101453 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.6", "require": { "php": "~8.1.0||~8.2.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 6b4ee27e2f11b..83579945c7993 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.3", "require": { "php": "~8.1.0||~8.2.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 791bfbd7b1a73..eefc79cab6449 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.6", "require": { "php": "~8.1.0||~8.2.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 d25e69071a791..09ca895acd3a5 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.6", "require": { "php": "~8.1.0||~8.2.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 dc80330fa3828..6292a52d88b30 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.6", "require": { "php": "~8.1.0||~8.2.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 7dafa8b8f4d07..9d45e1aad05d2 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.5", "require": { "php": "~8.1.0||~8.2.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 5e19ae73f5781..8487448711b77 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.5", "require": { "php": "~8.1.0||~8.2.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 0fa7ec8250c94..46e20d0ca80f2 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.6", "require": { "php": "~8.1.0||~8.2.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 107d4755d92c4..a25b0b54fa1f8 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.5", "require": { "php": "~8.1.0||~8.2.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 2af748d990c35..20b3aaf5fafbe 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.4", "require": { "php": "~8.1.0||~8.2.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 f671abff34d08..1b119f82795e5 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.6", "require": { "php": "~8.1.0||~8.2.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 4d8e565267a81..597f8c34b1022 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": "~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.2", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json index 36503adfc841c..d7306eee34237 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.3", "require": { "php": "~8.1.0||~8.2.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 d8c713391c4a0..8f4e9faff6bcf 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.5", "require": { "php": "~8.1.0||~8.2.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 9bdd9d48f1cc7..9a029ab0ead9d 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.4", "require": { "php": "~8.1.0||~8.2.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 16851cad3d89f..9c7eb79d5ad09 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.3", "require": { "php": "~8.1.0||~8.2.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 226f55ed11319..91665633d491d 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.6", "require": { "php": "~8.1.0||~8.2.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 aa4d28bcc7f73..c60000c8b68ba 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.3", "require": { "php": "~8.1.0||~8.2.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 e30a41ae1f95d..8427390aee5cb 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.6", "require": { "php": "~8.1.0||~8.2.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 82063e9c1bfbc..94142e9f30389 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.6", "require": { "php": "~8.1.0||~8.2.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 d990be3af68b0..be58362c32039 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": "~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.4", + "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" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/WishlistGraphQl/composer.json b/app/code/Magento/WishlistGraphQl/composer.json index d5bb93fefa7ec..f0bd5758c3045 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": "~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.6", + "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" @@ -25,3 +26,4 @@ } } } + diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index d5cb290cc67b9..badcf6e8490e3 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.6", "require": { "php": "~8.1.0||~8.2.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 afb262619592a..4f1e04c72d152 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.6", "require": { "php": "~8.1.0||~8.2.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 f456c842cbdd4..e344b2309e683 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.6", "require": { "php": "~8.1.0||~8.2.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 d6f7337988934..c57e65f34e2ea 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.4", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~8.1.0||~8.2.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 7beccb44975b3..9cc399090ec91 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.2", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~8.1.0||~8.2.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 07cce7c905463..8588e4ed2ec04 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.6", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~8.1.0||~8.2.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 488f553682957..7f1ec96fd024b 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.6", "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -64,11 +65,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 d846142a3ab8b49597dfb8bd7508d875efdab19a Mon Sep 17 00:00:00 2001 From: magento packaging service Date: Thu, 23 Feb 2023 14:15:30 +0000 Subject: [PATCH 047/277] Updating root composer files for publication service for 2.4.6 --- composer.json | 528 +++++++++++++++++++++++++------------------------- 1 file changed, 265 insertions(+), 263 deletions(-) diff --git a/composer.json b/composer.json index 8d961b68fa205..ebddb6feb59a2 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "preferred-install": "dist", "sort-packages": true }, + "version": "2.4.6", "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -91,6 +92,30 @@ "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", @@ -106,290 +131,267 @@ "sebastian/phpcpd": "^6.0", "symfony/finder": "^5.4" }, - "suggest": { - "ext-pcntl": "Need for run processes in parallel mode" + "conflict": { + "gene/bluefoot": "*" }, "replace": { - "magento/module-marketplace": "*", - "magento/module-admin-analytics": "*", - "magento/module-admin-notification": "*", - "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-open-search": "*", - "magento/module-elasticsearch": "*", - "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.4", + "magento/module-admin-analytics": "100.4.5", + "magento/module-admin-notification": "100.4.5", + "magento/module-advanced-pricing-import-export": "100.4.6", + "magento/module-amqp": "100.4.3", + "magento/module-analytics": "100.4.6", + "magento/module-asynchronous-operations": "100.4.6", + "magento/module-authorization": "100.4.6", + "magento/module-advanced-search": "100.4.4", + "magento/module-backend": "102.0.6", + "magento/module-backup": "100.4.6", + "magento/module-bundle": "101.0.6", + "magento/module-bundle-graph-ql": "100.4.6", + "magento/module-bundle-import-export": "100.4.5", + "magento/module-cache-invalidate": "100.4.4", + "magento/module-captcha": "100.4.6", + "magento/module-cardinal-commerce": "100.4.4", + "magento/module-catalog": "104.0.6", + "magento/module-catalog-customer-graph-ql": "100.4.5", + "magento/module-catalog-analytics": "100.4.3", + "magento/module-catalog-import-export": "101.1.6", + "magento/module-catalog-inventory": "100.4.6", + "magento/module-catalog-inventory-graph-ql": "100.4.3", + "magento/module-catalog-rule": "101.2.6", + "magento/module-catalog-rule-graph-ql": "100.4.3", + "magento/module-catalog-rule-configurable": "100.4.5", + "magento/module-catalog-search": "102.0.6", + "magento/module-catalog-url-rewrite": "100.4.6", + "magento/module-catalog-widget": "100.4.6", + "magento/module-checkout": "100.4.6", + "magento/module-checkout-agreements": "100.4.5", + "magento/module-checkout-agreements-graph-ql": "100.4.2", + "magento/module-cms": "104.0.6", + "magento/module-cms-url-rewrite": "100.4.5", + "magento/module-compare-list-graph-ql": "100.4.2", + "magento/module-config": "101.2.6", + "magento/module-configurable-import-export": "100.4.4", + "magento/module-configurable-product": "100.4.6", + "magento/module-configurable-product-sales": "100.4.3", + "magento/module-contact": "100.4.5", + "magento/module-cookie": "100.4.6", + "magento/module-cron": "100.4.6", + "magento/module-currency-symbol": "100.4.4", + "magento/module-customer": "103.0.6", + "magento/module-customer-analytics": "100.4.3", + "magento/module-customer-downloadable-graph-ql": "100.4.2", + "magento/module-customer-import-export": "100.4.6", + "magento/module-deploy": "100.4.6", + "magento/module-developer": "100.4.6", + "magento/module-dhl": "100.4.5", + "magento/module-directory": "100.4.6", + "magento/module-directory-graph-ql": "100.4.4", + "magento/module-downloadable": "100.4.6", + "magento/module-downloadable-graph-ql": "100.4.6", + "magento/module-downloadable-import-export": "100.4.5", + "magento/module-eav": "102.1.6", + "magento/module-open-search": "100.4.0", + "magento/module-elasticsearch": "101.0.6", + "magento/module-elasticsearch-7": "100.4.6", + "magento/module-email": "101.1.6", + "magento/module-encryption-key": "100.4.4", + "magento/module-fedex": "100.4.4", + "magento/module-gift-message": "100.4.5", + "magento/module-gift-message-graph-ql": "100.4.4", + "magento/module-google-adwords": "100.4.3", + "magento/module-google-analytics": "100.4.2", + "magento/module-google-optimizer": "100.4.5", + "magento/module-google-gtag": "100.4.1", + "magento/module-graph-ql": "100.4.6", + "magento/module-graph-ql-cache": "100.4.3", + "magento/module-catalog-graph-ql": "100.4.6", + "magento/module-catalog-cms-graph-ql": "100.4.2", + "magento/module-catalog-url-rewrite-graph-ql": "100.4.4", + "magento/module-configurable-product-graph-ql": "100.4.6", + "magento/module-customer-graph-ql": "100.4.6", + "magento/module-eav-graph-ql": "100.4.3", + "magento/module-swatches-graph-ql": "100.4.4", + "magento/module-tax-graph-ql": "100.4.2", + "magento/module-url-rewrite-graph-ql": "100.4.5", + "magento/module-cms-url-rewrite-graph-ql": "100.4.4", + "magento/module-weee-graph-ql": "100.4.3", + "magento/module-cms-graph-ql": "100.4.3", + "magento/module-grouped-import-export": "100.4.4", + "magento/module-grouped-product": "100.4.6", + "magento/module-grouped-catalog-inventory": "100.4.3", + "magento/module-grouped-product-graph-ql": "100.4.6", + "magento/module-import-export": "101.0.6", + "magento/module-indexer": "100.4.6", + "magento/module-instant-purchase": "100.4.5", + "magento/module-integration": "100.4.6", + "magento/module-layered-navigation": "100.4.6", + "magento/module-login-as-customer": "100.4.6", + "magento/module-login-as-customer-admin-ui": "100.4.6", + "magento/module-login-as-customer-api": "100.4.5", + "magento/module-login-as-customer-assistance": "100.4.5", + "magento/module-login-as-customer-frontend-ui": "100.4.5", + "magento/module-login-as-customer-graph-ql": "100.4.3", + "magento/module-login-as-customer-log": "100.4.4", + "magento/module-login-as-customer-quote": "100.4.4", + "magento/module-login-as-customer-page-cache": "100.4.5", + "magento/module-login-as-customer-sales": "100.4.5", + "magento/module-media-content": "100.4.4", + "magento/module-media-content-api": "100.4.5", + "magento/module-media-content-catalog": "100.4.4", + "magento/module-media-content-cms": "100.4.4", + "magento/module-media-gallery": "100.4.5", + "magento/module-media-gallery-api": "101.0.5", + "magento/module-media-gallery-ui": "100.4.5", + "magento/module-media-gallery-ui-api": "100.4.4", + "magento/module-media-gallery-integration": "100.4.5", + "magento/module-media-gallery-synchronization": "100.4.5", + "magento/module-media-gallery-synchronization-api": "100.4.4", + "magento/module-media-content-synchronization": "100.4.5", + "magento/module-media-content-synchronization-api": "100.4.4", + "magento/module-media-content-synchronization-catalog": "100.4.3", + "magento/module-media-content-synchronization-cms": "100.4.3", + "magento/module-media-gallery-synchronization-metadata": "100.4.2", + "magento/module-media-gallery-metadata": "100.4.4", + "magento/module-media-gallery-metadata-api": "100.4.3", + "magento/module-media-gallery-catalog-ui": "100.4.3", + "magento/module-media-gallery-cms-ui": "100.4.3", + "magento/module-media-gallery-catalog-integration": "100.4.3", + "magento/module-media-gallery-catalog": "100.4.3", + "magento/module-media-gallery-renditions": "100.4.4", + "magento/module-media-gallery-renditions-api": "100.4.3", + "magento/module-media-storage": "100.4.5", + "magento/module-message-queue": "100.4.6", + "magento/module-msrp": "100.4.5", + "magento/module-msrp-configurable-product": "100.4.3", + "magento/module-msrp-grouped-product": "100.4.3", + "magento/module-multishipping": "100.4.6", + "magento/module-mysql-mq": "100.4.4", + "magento/module-new-relic-reporting": "100.4.4", + "magento/module-newsletter": "100.4.6", + "magento/module-newsletter-graph-ql": "100.4.3", + "magento/module-offline-payments": "100.4.4", + "magento/module-offline-shipping": "100.4.5", + "magento/module-page-cache": "100.4.6", + "magento/module-payment": "100.4.6", + "magento/module-payment-graph-ql": "100.4.1", + "magento/module-paypal": "101.0.6", + "magento/module-paypal-captcha": "100.4.3", + "magento/module-paypal-graph-ql": "100.4.4", + "magento/module-persistent": "100.4.6", + "magento/module-product-alert": "100.4.5", + "magento/module-product-video": "100.4.6", + "magento/module-quote": "101.2.6", + "magento/module-quote-analytics": "100.4.5", + "magento/module-quote-bundle-options": "100.4.2", + "magento/module-quote-configurable-options": "100.4.2", + "magento/module-quote-downloadable-links": "100.4.2", + "magento/module-quote-graph-ql": "100.4.6", + "magento/module-related-product-graph-ql": "100.4.3", + "magento/module-release-notification": "100.4.4", + "magento/module-reports": "100.4.6", + "magento/module-require-js": "100.4.2", + "magento/module-review": "100.4.6", + "magento/module-review-graph-ql": "100.4.2", + "magento/module-review-analytics": "100.4.3", + "magento/module-robots": "101.1.2", + "magento/module-rss": "100.4.4", + "magento/module-rule": "100.4.5", + "magento/module-sales": "103.0.6", + "magento/module-sales-analytics": "100.4.3", + "magento/module-sales-graph-ql": "100.4.6", + "magento/module-sales-inventory": "100.4.3", + "magento/module-sales-rule": "101.2.6", + "magento/module-sales-sequence": "100.4.3", + "magento/module-sample-data": "100.4.4", + "magento/module-search": "101.1.6", + "magento/module-security": "100.4.6", + "magento/module-send-friend": "100.4.4", + "magento/module-send-friend-graph-ql": "100.4.2", + "magento/module-shipping": "100.4.6", + "magento/module-sitemap": "100.4.5", + "magento/module-store": "101.1.6", + "magento/module-store-graph-ql": "100.4.4", + "magento/module-swagger": "100.4.5", + "magento/module-swagger-webapi": "100.4.2", + "magento/module-swagger-webapi-async": "100.4.2", + "magento/module-swatches": "100.4.6", + "magento/module-swatches-layered-navigation": "100.4.2", + "magento/module-tax": "100.4.6", + "magento/module-tax-import-export": "100.4.5", + "magento/module-theme": "101.1.6", + "magento/module-theme-graph-ql": "100.4.3", + "magento/module-translation": "100.4.6", + "magento/module-ui": "101.2.6", + "magento/module-ups": "100.4.6", + "magento/module-url-rewrite": "102.0.5", + "magento/module-user": "101.2.6", + "magento/module-usps": "100.4.5", + "magento/module-variable": "100.4.4", + "magento/module-vault": "101.2.6", + "magento/module-vault-graph-ql": "100.4.2", + "magento/module-version": "100.4.3", + "magento/module-webapi": "100.4.5", + "magento/module-webapi-async": "100.4.4", + "magento/module-webapi-security": "100.4.3", + "magento/module-weee": "100.4.6", + "magento/module-widget": "101.2.6", + "magento/module-wishlist": "101.2.6", + "magento/module-wishlist-graph-ql": "100.4.6", + "magento/module-wishlist-analytics": "100.4.4", + "magento/theme-adminhtml-backend": "100.4.6", + "magento/theme-frontend-blank": "100.4.6", + "magento/theme-frontend-luma": "100.4.6", + "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.6", + "magento/framework-amqp": "100.4.4", + "magento/framework-bulk": "101.0.2", + "magento/framework-message-queue": "100.4.6", "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.5", + "magento/module-aws-s3": "100.4.4", + "magento/module-remote-storage": "100.4.4", + "magento/module-jwt-framework-adapter": "100.4.2", + "magento/module-jwt-user-token": "100.4.1" }, - "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" ], - "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 e92b739bc457c5fc4e5da789f539f6b870e2b5ee Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" Date: Wed, 15 Mar 2023 18:16:08 +0530 Subject: [PATCH 048/277] AC-6506 automated --- .../AdminProductFormSection.xml | 11 ++ ...tockAsNoOnTestStockAndMainWebsitesTest.xml | 126 ++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml index 0a3c67bc00d5b..d0efb5ededb6c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml @@ -83,5 +83,16 @@ + + + + + + + + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml new file mode 100644 index 0000000000000..0575be444ff4a --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml @@ -0,0 +1,126 @@ + + + + + + + + + <stories value="Only X left is not displayed for Simple product with 'Mange Stock' = 'No' on Test stock and Main website"/> + <description value="Only X left is not displayed for Simple product with 'Mange Stock' = 'No' on Test stock and Main website"/> + <testCaseId value="AC-6506"/> + <severity value="CRITICAL"/> + </annotations> + <before> + <!-- Step1: Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> + + <!-- Disable all sources and delete any pre-existing stocks --> + <actionGroup ref="DisableAllSourcesActionGroup" stepKey="DisableAllsources"/> + <actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteToDefaultStock"> + <argument name="stockName" value="{{_defaultStock.name}}"/> + <argument name="websiteName" value="{{_defaultWebsite.name}}"/> + </actionGroup> + <magentoCLI stepKey="reindexBefore" command="indexer:reindex"/> + <magentoCLI stepKey="flushCacheBefore" command="cache:flush"/> + + <magentoCLI command="config:set cataloginventory/options/stock_threshold_qty 5" stepKey="setStockThresholdValueTo5"/> + <magentoCLI command="indexer:reindex" stepKey="reindex1"/> + <magentoCLI command="cache:flush" stepKey="flushCache1"/> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <actionGroup ref="DisableSourceActionGroup" stepKey="disableCreatedSource"> + <argument name="sourceCode" value="$$createSource.source[source_code]$$"/> + </actionGroup> + <actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteBackToDefaultStock"> + <argument name="stockName" value="{{_defaultStock.name}}"/> + <argument name="websiteName" value="{{_defaultWebsite.name}}"/> + </actionGroup> + + <deleteData createDataKey="createStock" stepKey="deleteStock"/> + <magentoCLI stepKey="reindexAfter" command="indexer:reindex"/> + <magentoCLI stepKey="flushCacheAfter" command="cache:flush"/> + <magentoCLI command="config:set {{CatalogInventoryOptionsOnlyXleftThreshold.path}} {{CatalogInventoryOptionsOnlyXleftThreshold.value}}" stepKey="removedStockThresholdQty"/> + </after> + + <!-- Step2: Create the Subcategory --> + <createData entity="_defaultCategory" stepKey="createCategory"/> + + <!-- Step3: Create the Source and the Stock --> + <createData entity="BasicMsiStockWithMainWebsite1" stepKey="createStock"/> + <createData entity="FullSource1" stepKey="createSource"/> + <createData entity="SourceStockLinked1" stepKey="stockSourceLink"> + <requiredEntity createDataKey="createSource"/> + <requiredEntity createDataKey="createStock"/> + </createData> + + <!-- Step8: Create the Simple Product --> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Update the product as per the test case --> + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForCreatedProduct"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + + <fillField userInput="10" selector="{{AdminProductFormSection.productPrice}}" stepKey="updatePriceTo10"/> + <fillField userInput="1" selector="{{AdminProductFormSection.productWeight}}" stepKey="updateWeight"/> + <conditionalClick selector="{{AdminProductFormSection.unassignSource('Default Source')}}" dependentSelector="{{AdminProductFormSection.unassignSource('Default Source')}}" visible="true" stepKey="unassignDefaultSource"/> + <click selector="{{AdminProductFormSection.btnAssignSources}}" stepKey="clickAssignSourcesButton"/> + <waitForElementVisible selector="{{AdminProductFormSection.searchBySource}}" stepKey="waitForSearchSourceToBeVisible"/> + <fillField userInput="$$createSource.source[source_code]$$" selector="{{AdminProductFormSection.searchBySource}}" stepKey="enterSource"/> + <click selector="{{AdminProductFormSection.clickSearch}}" stepKey="clickSearchButton"/> + <waitForElementVisible selector="{{AdminProductFormSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="waitForAssignsourcesToBeVisible"/> + <checkOption selector="{{AdminProductFormSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="checkTheCreatedSource"/> + <click selector="{{AdminProductFormSection.btnDoneAssignedSources}}" stepKey="clickOnDoneButton"/> + <fillField userInput="2" selector="{{AdminProductFormSection.assignedSourcesQty}}" stepKey="setQtyForAssignedSources"/> + <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButton"/> + <see userInput="You saved the product." stepKey="saveSuccessfulForManagestockAsYes"/> + + <magentoCLI stepKey="reindexForAssignedSources" command="indexer:reindex"/> + <magentoCLI stepKey="flushCacheForAssignedSources" command="cache:flush"/> + + <!-- Verify with Manage Stock set as Yes for the product --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> + </actionGroup> + <see selector=".availability.only" userInput="Only 2 left" stepKey="seeCurrentProductQuantity2"/> + + <!-- Update the Manage Stock as No for the product --> + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForCreatedProductForManageStockAsNo"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProductForManageStockAsNo"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <waitForElementVisible selector="{{AdminProductFormSection.btnAdvancedInventory}}" stepKey="waitForAdvancedInventoryToBeVisible"/> + <click selector="{{AdminProductFormSection.btnAdvancedInventory}}" stepKey="clickOnAdvancedInventoryButton"/> + <waitForElementVisible selector="{{AdminProductFormSection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="waitForAdvancedInventoryPageToBeLoaded"/> + <uncheckOption selector="{{AdminProductFormSection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="uncheckManageStockOption"/> + <selectOption userInput="No" selector="{{AdminProductFormSection.selectManageStockOption}}" stepKey="selectNoAsManageStock"/> + <click selector="{{AdminProductFormSection.btnDoneAdvancedInventory}}" stepKey="clickOnAdvancedInventoryDoneButton"/> + <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButtonPostSettingManageStockAsNo"/> + <see userInput="You saved the product." stepKey="saveSuccessfulForManagestockAsNo"/> + <magentoCLI stepKey="reindexForSettingManagestockAsNo" command="indexer:reindex"/> + <magentoCLI stepKey="flushCacheForSettingManagestockAsNo" command="cache:flush"/> + + <!-- Verify with Manage Stock set as No for the product --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPageOnStorefrontForManageStockAsNo"> + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> + </actionGroup> + <dontSee selector=".availability.only" userInput="Only 2 left" stepKey="ShouldNotSeeCurrentProductQuantity"/> + + </test> +</tests> From 7fcfc3160a07e2b33a8a557c4fbb2d36feeea79e Mon Sep 17 00:00:00 2001 From: Dmytro Voskoboinikov <dmitry.voskoboynikov@gmail.com> Date: Wed, 22 Mar 2023 10:44:07 -0500 Subject: [PATCH 049/277] Revert "Revert "Cia 2.4.7 beta1 bugfixes 02062023"" --- .../Authorization/Model/IdentityProvider.php | 87 ++++++ .../Test/Unit/Model/IdentityProviderTest.php | 133 ++++++++ app/code/Magento/Authorization/etc/di.xml | 2 + app/code/Magento/Authorization/i18n/en_US.csv | 2 + .../WebapiRequestTypeExtractor.php | 43 +++ .../WebapiRequestTypeExtractorTest.php | 67 ++++ app/code/Magento/Checkout/etc/di.xml | 9 + .../BackpressureContextFactory.php | 73 +++++ .../BackpressureFieldValidator.php | 65 ++++ .../CompositeRequestTypeExtractor.php | 45 +++ .../Model/Backpressure/GraphQlContext.php | 106 +++++++ .../GraphQlTooManyRequestsException.php | 54 ++++ .../RequestTypeExtractorInterface.php | 25 ++ .../BackpressureContextFactoryTest.php | 132 ++++++++ app/code/Magento/GraphQl/etc/di.xml | 11 + .../Model/BackpressureTypeExtractor.php | 46 +++ app/code/Magento/InstantPurchase/etc/di.xml | 10 + .../Model/Backpressure/Config/LimitValue.php | 35 +++ .../Backpressure/Config/PeriodSource.php | 29 ++ .../Model/Backpressure/Config/PeriodValue.php | 76 +++++ .../Backpressure/OrderLimitConfigManager.php | 102 ++++++ .../WebapiRequestTypeExtractor.php | 49 +++ .../OrderLimitConfigManagerTest.php | 124 ++++++++ .../WebapiRequestTypeExtractorTest.php | 71 +++++ .../Magento/Quote/etc/adminhtml/system.xml | 31 ++ app/code/Magento/Quote/etc/config.xml | 8 + app/code/Magento/Quote/etc/di.xml | 16 + app/code/Magento/Quote/i18n/en_US.csv | 4 + .../BackpressureRequestTypeExtractor.php | 62 ++++ app/code/Magento/QuoteGraphQl/etc/di.xml | 9 + .../Controller/Rest/RequestValidator.php | 101 ++++-- .../Controller/Soap/Request/Handler.php | 64 +++- .../Controller/Rest/RequestValidatorTest.php | 8 +- app/code/Magento/Webapi/i18n/en_US.csv | 1 + app/etc/di.xml | 25 ++ .../Controller/Read/Read.php | 40 +++ .../Model/LimitConfigManager.php | 24 ++ .../Model/TypeExtractor.php | 28 ++ .../composer.json | 21 ++ .../etc/di.xml | 27 ++ .../etc/frontend/routes.xml | 14 + .../etc/module.xml | 10 + .../registration.php | 13 + .../Model/LimitConfigManager.php | 24 ++ .../Model/TestServiceResolver.php | 41 +++ .../Model/TypeExtractor.php | 27 ++ .../composer.json | 21 ++ .../TestModuleGraphQlBackpressure/etc/di.xml | 29 ++ .../etc/module.xml | 10 + .../etc/routes.xml | 14 + .../etc/schema.graphqls | 10 + .../registration.php | 13 + .../Api/TestReadServiceInterface.php | 17 + .../Model/LimitConfigManager.php | 24 ++ .../Model/TestReadService.php | 39 +++ .../Model/TypeExtractor.php | 27 ++ .../composer.json | 21 ++ .../TestModuleWebapiBackpressure/etc/di.xml | 29 ++ .../etc/module.xml | 10 + .../etc/routes.xml | 14 + .../etc/webapi.xml | 17 + .../registration.php | 13 + .../Checkout/Model/BackpressureTest.php | 119 +++++++ .../ControllerBackpressureTest.php | 53 ++++ .../GraphQl/Quote/BackpressureTest.php | 110 +++++++ .../Model/BackpressureTest.php | 102 ++++++ .../Magento/Quote/Model/BackpressureTest.php | 119 +++++++ .../BackpressureExceededException.php | 16 + .../App/Backpressure/ContextInterface.php | 53 ++++ .../IdentityProviderInterface.php | 29 ++ .../CompositeLimitConfigManager.php | 50 +++ .../SlidingWindow/LimitConfig.php | 55 ++++ .../LimitConfigManagerInterface.php | 25 ++ .../SlidingWindow/RedisRequestLogger.php | 112 +++++++ .../RedisRequestLogger/RedisClient.php | 249 +++++++++++++++ .../SlidingWindow/RequestLoggerFactory.php | 53 ++++ .../RequestLoggerFactoryInterface.php | 25 ++ .../SlidingWindow/RequestLoggerInterface.php | 40 +++ .../SlidingWindow/SlidingWindowEnforcer.php | 120 +++++++ .../App/BackpressureEnforcerInterface.php | 27 ++ .../CompositeRequestTypeExtractor.php | 46 +++ .../Request/Backpressure/ContextFactory.php | 72 +++++ .../Backpressure/ControllerContext.php | 107 +++++++ .../RequestTypeExtractorInterface.php | 27 ++ .../App/Request/BackpressureValidator.php | 90 ++++++ .../SlidingWindow/RedisRequestLoggerTest.php | 92 ++++++ .../SlidingWindowEnforcerTest.php | 231 ++++++++++++++ .../Backpressure/ContextFactoryTest.php | 130 ++++++++ .../BackpressureContextFactory.php | 75 +++++ ...kpressureRequestTypeExtractorInterface.php | 25 ++ .../CompositeRequestTypeExtractor.php | 43 +++ .../Webapi/Backpressure/RestContext.php | 142 +++++++++ .../Magento/Framework/Webapi/Exception.php | 25 +- .../BackpressureContextFactoryTest.php | 119 +++++++ .../CompositeRequestTypeExtractorTest.php | 82 +++++ setup/src/Magento/Setup/Model/ConfigModel.php | 2 +- .../Magento/Setup/Model/ConfigOptionsList.php | 1 + .../ConfigOptionsList/BackpressureLogger.php | 295 ++++++++++++++++++ .../BackpressureLoggerTest.php | 268 ++++++++++++++++ 99 files changed, 5487 insertions(+), 44 deletions(-) create mode 100644 app/code/Magento/Authorization/Model/IdentityProvider.php create mode 100644 app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php create mode 100644 app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php create mode 100644 app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php create mode 100644 app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php create mode 100644 app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php create mode 100644 app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php create mode 100644 app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php create mode 100644 app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php create mode 100644 app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php create mode 100644 app/code/Magento/GraphQl/Test/Unit/Model/Backpressure/BackpressureContextFactoryTest.php create mode 100644 app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php create mode 100644 app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php create mode 100644 app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php create mode 100644 app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php create mode 100644 app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php create mode 100644 app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php create mode 100644 app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php create mode 100644 app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php create mode 100644 app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/TypeExtractor.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/composer.json create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/di.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TestServiceResolver.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls create mode 100644 dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/LimitConfigManager.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TestReadService.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/composer.json create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/di.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml create mode 100644 dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php create mode 100644 dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php create mode 100644 dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/ContextInterface.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/IdentityProviderInterface.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/CompositeLimitConfigManager.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerInterface.php create mode 100644 lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/SlidingWindowEnforcer.php create mode 100644 lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php create mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/CompositeRequestTypeExtractor.php create mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php create mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php create mode 100644 lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php create mode 100644 lib/internal/Magento/Framework/App/Request/BackpressureValidator.php create mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php create mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php create mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php create mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php create mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php create mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/CompositeRequestTypeExtractor.php create mode 100644 lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php create mode 100644 lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/BackpressureContextFactoryTest.php create mode 100644 lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php create mode 100644 setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php create mode 100644 setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php diff --git a/app/code/Magento/Authorization/Model/IdentityProvider.php b/app/code/Magento/Authorization/Model/IdentityProvider.php new file mode 100644 index 0000000000000..b29a8e7f9c530 --- /dev/null +++ b/app/code/Magento/Authorization/Model/IdentityProvider.php @@ -0,0 +1,87 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Authorization\Model; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; + +/** + * Utilizes UserContext for backpressure identity + */ +class IdentityProvider implements IdentityProviderInterface +{ + /** + * User context identity type map + */ + private const USER_CONTEXT_IDENTITY_TYPE_MAP = [ + UserContextInterface::USER_TYPE_CUSTOMER => ContextInterface::IDENTITY_TYPE_CUSTOMER, + UserContextInterface::USER_TYPE_ADMIN => ContextInterface::IDENTITY_TYPE_ADMIN + ]; + + /** + * @var UserContextInterface + */ + private UserContextInterface $userContext; + + /** + * @var RemoteAddress + */ + private RemoteAddress $remoteAddress; + + /** + * @param UserContextInterface $userContext + * @param RemoteAddress $remoteAddress + */ + public function __construct(UserContextInterface $userContext, RemoteAddress $remoteAddress) + { + $this->userContext = $userContext; + $this->remoteAddress = $remoteAddress; + } + + /** + * @inheritDoc + * + * @throws RuntimeException + */ + public function fetchIdentityType(): int + { + if (!$this->userContext->getUserId()) { + return ContextInterface::IDENTITY_TYPE_IP; + } + + $userType = $this->userContext->getUserType(); + if (isset(self::USER_CONTEXT_IDENTITY_TYPE_MAP[$userType])) { + return self::USER_CONTEXT_IDENTITY_TYPE_MAP[$userType]; + } + + throw new RuntimeException(__('User type not defined')); + } + + /** + * @inheritDoc + * + * @throws RuntimeException + */ + public function fetchIdentity(): string + { + $userId = $this->userContext->getUserId(); + if ($userId) { + return (string)$userId; + } + + $address = $this->remoteAddress->getRemoteAddress(); + if (!$address) { + throw new RuntimeException(__('Failed to extract remote address')); + } + + return $address; + } +} diff --git a/app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php b/app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php new file mode 100644 index 0000000000000..6c057f81b9e33 --- /dev/null +++ b/app/code/Magento/Authorization/Test/Unit/Model/IdentityProviderTest.php @@ -0,0 +1,133 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Authorization\Test\Unit\Model; + +use Magento\Authorization\Model\IdentityProvider; +use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Tests the IdentityProvider class + */ +class IdentityProviderTest extends TestCase +{ + /** + * @var UserContextInterface|MockObject + */ + private $userContext; + + /** + * @var RemoteAddress|MockObject + */ + private $remoteAddress; + + /** + * @var IdentityProvider + */ + private $model; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->userContext = $this->createMock(UserContextInterface::class); + $this->remoteAddress = $this->createMock(RemoteAddress::class); + $this->model = new IdentityProvider($this->userContext, $this->remoteAddress); + } + + /** + * Cases for identity provider. + * + * @return array + */ + public function getIdentityCases(): array + { + return [ + 'empty-user-context' => [null, null, '127.0.0.1', ContextInterface::IDENTITY_TYPE_IP, '127.0.0.1'], + 'guest-user-context' => [ + UserContextInterface::USER_TYPE_GUEST, + null, + '127.0.0.1', + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1' + ], + 'admin-user-context' => [ + UserContextInterface::USER_TYPE_ADMIN, + 42, + '127.0.0.1', + ContextInterface::IDENTITY_TYPE_ADMIN, + '42' + ], + 'customer-user-context' => [ + UserContextInterface::USER_TYPE_CUSTOMER, + 42, + '127.0.0.1', + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42' + ], + ]; + } + + /** + * Verify identity provider. + * + * @param int|null $userType + * @param int|null $userId + * @param string $remoteAddr + * @param int $expectedType + * @param string $expectedIdentity + * @return void + * @dataProvider getIdentityCases + */ + public function testFetchIdentity( + ?int $userType, + ?int $userId, + string $remoteAddr, + int $expectedType, + string $expectedIdentity + ): void { + $this->userContext->method('getUserType')->willReturn($userType); + $this->userContext->method('getUserId')->willReturn($userId); + $this->remoteAddress->method('getRemoteAddress')->willReturn($remoteAddr); + + $this->assertEquals($expectedType, $this->model->fetchIdentityType()); + $this->assertEquals($expectedIdentity, $this->model->fetchIdentity()); + } + + /** + * Tests fetching an identity type when user type can't be defined + */ + public function testFetchIdentityTypeUserTypeNotDefined() + { + $this->userContext->method('getUserId')->willReturn(2); + $this->userContext->method('getUserType')->willReturn(null); + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage(__('User type not defined')->getText()); + $this->model->fetchIdentityType(); + } + + /** + * Tests fetching an identity when user address can't be extracted + */ + public function testFetchIdentityFailedToExtractRemoteAddress() + { + $this->userContext->method('getUserId')->willReturn(null); + $this->remoteAddress->method('getRemoteAddress')->willReturn(false); + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage(__('Failed to extract remote address')->getText()); + $this->model->fetchIdentity(); + } +} diff --git a/app/code/Magento/Authorization/etc/di.xml b/app/code/Magento/Authorization/etc/di.xml index 21420922ef596..bace3690a6066 100644 --- a/app/code/Magento/Authorization/etc/di.xml +++ b/app/code/Magento/Authorization/etc/di.xml @@ -24,4 +24,6 @@ </arguments> </type> <preference for="Magento\Authorization\Model\UserContextInterface" type="Magento\Authorization\Model\CompositeUserContext"/> + <preference for="Magento\Framework\App\Backpressure\IdentityProviderInterface" + type="Magento\Authorization\Model\IdentityProvider"/> </config> diff --git a/app/code/Magento/Authorization/i18n/en_US.csv b/app/code/Magento/Authorization/i18n/en_US.csv index c2d0eaa1df978..f52cf7ebec2b7 100644 --- a/app/code/Magento/Authorization/i18n/en_US.csv +++ b/app/code/Magento/Authorization/i18n/en_US.csv @@ -1,2 +1,4 @@ "We can't find the role for the user you wanted.","We can't find the role for the user you wanted." "Something went wrong while compiling a list of allowed resources. You can find out more in the exceptions log.","Something went wrong while compiling a list of allowed resources. You can find out more in the exceptions log." +"User type not defined","User type not defined" +"Failed to extract remote address","Failed to extract remote address" diff --git a/app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php b/app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php new file mode 100644 index 0000000000000..a01bf234ec93b --- /dev/null +++ b/app/code/Magento/Checkout/Model/Backpressure/WebapiRequestTypeExtractor.php @@ -0,0 +1,43 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Checkout\Model\Backpressure; + +use Magento\Framework\Webapi\Backpressure\BackpressureRequestTypeExtractorInterface; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; + +/** + * Identifies which checkout related functionality needs backpressure management + */ +class WebapiRequestTypeExtractor implements BackpressureRequestTypeExtractorInterface +{ + private const METHOD = 'savePaymentInformationAndPlaceOrder'; + + /** + * @var OrderLimitConfigManager + */ + private OrderLimitConfigManager $config; + + /** + * @param OrderLimitConfigManager $config + */ + public function __construct(OrderLimitConfigManager $config) + { + $this->config = $config; + } + + /** + * @inheritDoc + */ + public function extract(string $service, string $method, string $endpoint): ?string + { + return self::METHOD === $method && $this->config->isEnforcementEnabled() + ? OrderLimitConfigManager::REQUEST_TYPE_ID + : null; + } +} diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php new file mode 100644 index 0000000000000..a55920fb1cf2e --- /dev/null +++ b/app/code/Magento/Checkout/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php @@ -0,0 +1,67 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Test\Unit\Model\Backpressure; + +use Magento\Checkout\Model\Backpressure\WebapiRequestTypeExtractor; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Tests the WebapiRequestTypeExtractor class + */ +class WebapiRequestTypeExtractorTest extends TestCase +{ + /** + * @var OrderLimitConfigManager|MockObject + */ + private $orderLimitConfigManagerMock; + + /** + * @var WebapiRequestTypeExtractor + */ + private WebapiRequestTypeExtractor $webapiRequestTypeExtractor; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->orderLimitConfigManagerMock = $this->createMock(OrderLimitConfigManager::class); + + $this->webapiRequestTypeExtractor = new WebapiRequestTypeExtractor($this->orderLimitConfigManagerMock); + } + + /** + * @param bool $isEnforcementEnabled + * @param string $method + * @param string|null $expected + * @dataProvider dataProvider + */ + public function testExtract(bool $isEnforcementEnabled, string $method, $expected) + { + $this->orderLimitConfigManagerMock->method('isEnforcementEnabled')->willReturn($isEnforcementEnabled); + + $this->assertEquals( + $expected, + $this->webapiRequestTypeExtractor->extract('someService', $method, 'someEndpoint') + ); + } + + /** + * @return array + */ + public function dataProvider(): array + { + return [ + [false, 'someMethod', null], + [false, 'savePaymentInformationAndPlaceOrder', null], + [true, 'savePaymentInformationAndPlaceOrder', 'quote-order'], + ]; + } +} diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index 280944dc4090c..7d57d7be4b736 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -54,6 +54,15 @@ type="Magento\Checkout\Model\CaptchaPaymentProcessingRateLimiter" /> <preference for="Magento\Checkout\Api\PaymentSavingRateLimiterInterface" type="Magento\Checkout\Model\CaptchaPaymentSavingRateLimiter" /> + <type name="Magento\Framework\Webapi\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="checkout" xsi:type="object"> + Magento\Checkout\Model\Backpressure\WebapiRequestTypeExtractor + </item> + </argument> + </arguments> + </type> <type name="Magento\Customer\Model\ResourceModel\Customer"> <plugin name="recollect_quote_on_customer_group_change" type="Magento\Checkout\Model\Plugin\RecollectQuoteOnCustomerGroupChange"/> </type> diff --git a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php new file mode 100644 index 0000000000000..b6598e561100c --- /dev/null +++ b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureContextFactory.php @@ -0,0 +1,73 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Model\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\GraphQl\Config\Element\Field; + +/** + * Creates context for fields + */ +class BackpressureContextFactory +{ + /** + * @var RequestTypeExtractorInterface + */ + private RequestTypeExtractorInterface $extractor; + + /** + * @var IdentityProviderInterface + */ + private IdentityProviderInterface $identityProvider; + + /** + * @var RequestInterface + */ + private RequestInterface $request; + + /** + * @param RequestTypeExtractorInterface $extractor + * @param IdentityProviderInterface $identityProvider + * @param RequestInterface $request + */ + public function __construct( + RequestTypeExtractorInterface $extractor, + IdentityProviderInterface $identityProvider, + RequestInterface $request + ) { + $this->extractor = $extractor; + $this->identityProvider = $identityProvider; + $this->request = $request; + } + + /** + * Creates context if possible + * + * @param Field $field + * @return ContextInterface|null + */ + public function create(Field $field): ?ContextInterface + { + $typeId = $this->extractor->extract($field); + if ($typeId === null) { + return null; + } + + return new GraphQlContext( + $this->request, + $this->identityProvider->fetchIdentity(), + $this->identityProvider->fetchIdentityType(), + $typeId, + $field->getResolver() + ); + } +} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php new file mode 100644 index 0000000000000..29ace4949d7be --- /dev/null +++ b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php @@ -0,0 +1,65 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Model\Backpressure; + +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\BackpressureEnforcerInterface; +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\Framework\GraphQl\Query\Resolver\Argument\ValidatorInterface; + +/** + * Enforces backpressure for queries/mutations + */ +class BackpressureFieldValidator implements ValidatorInterface +{ + /** + * @var BackpressureContextFactory + */ + private BackpressureContextFactory $backpressureContextFactory; + + /** + * @var BackpressureEnforcerInterface + */ + private BackpressureEnforcerInterface $backpressureEnforcer; + + /** + * @param BackpressureContextFactory $backpressureContextFactory + * @param BackpressureEnforcerInterface $backpressureEnforcer + */ + public function __construct( + BackpressureContextFactory $backpressureContextFactory, + BackpressureEnforcerInterface $backpressureEnforcer + ) { + $this->backpressureContextFactory = $backpressureContextFactory; + $this->backpressureEnforcer = $backpressureEnforcer; + } + + /** + * Validate resolver args + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @param Field $field + * @param array $args + * @return void + * @throws GraphQlTooManyRequestsException + */ + public function validate(Field $field, $args): void + { + $context = $this->backpressureContextFactory->create($field); + if (!$context) { + return; + } + + try { + $this->backpressureEnforcer->enforce($context); + } catch (BackpressureExceededException $exception) { + throw new GraphQlTooManyRequestsException(__('Too Many Requests')); + } + } +} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php b/app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php new file mode 100644 index 0000000000000..f3fb9d9988975 --- /dev/null +++ b/app/code/Magento/GraphQl/Model/Backpressure/CompositeRequestTypeExtractor.php @@ -0,0 +1,45 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Model\Backpressure; + +use Magento\Framework\GraphQl\Config\Element\Field; + +/** + * Extracts using other extractors + */ +class CompositeRequestTypeExtractor implements RequestTypeExtractorInterface +{ + /** + * @var RequestTypeExtractorInterface[] + */ + private array $extractors; + + /** + * @param RequestTypeExtractorInterface[] $extractors + */ + public function __construct(array $extractors) + { + $this->extractors = $extractors; + } + + /** + * @inheritDoc + */ + public function extract(Field $field): ?string + { + foreach ($this->extractors as $extractor) { + $type = $extractor->extract($field); + if ($type) { + return $type; + } + } + + return null; + } +} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php b/app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php new file mode 100644 index 0000000000000..5ce30093d46ee --- /dev/null +++ b/app/code/Magento/GraphQl/Model/Backpressure/GraphQlContext.php @@ -0,0 +1,106 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Model\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\RequestInterface; + +/** + * GraphQl request context + */ +class GraphQlContext implements ContextInterface +{ + /** + * @var RequestInterface + */ + private RequestInterface $request; + + /** + * @var string + */ + private string $identity; + + /** + * @var int + */ + private int $identityType; + + /** + * @var string + */ + private string $typeId; + + /** + * @var string + */ + private string $resolverClass; + + /** + * @param RequestInterface $request + * @param string $identity + * @param int $identityType + * @param string $typeId + * @param string $resolverClass + */ + public function __construct( + RequestInterface $request, + string $identity, + int $identityType, + string $typeId, + string $resolverClass + ) { + $this->request = $request; + $this->identity = $identity; + $this->identityType = $identityType; + $this->typeId = $typeId; + $this->resolverClass = $resolverClass; + } + + /** + * @inheritDoc + */ + public function getRequest(): RequestInterface + { + return $this->request; + } + + /** + * @inheritDoc + */ + public function getIdentity(): string + { + return $this->identity; + } + + /** + * @inheritDoc + */ + public function getIdentityType(): int + { + return $this->identityType; + } + + /** + * @inheritDoc + */ + public function getTypeId(): string + { + return $this->typeId; + } + + /** + * Field's resolver class name + * + * @return string + */ + public function getResolverClass(): string + { + return $this->resolverClass; + } +} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php b/app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php new file mode 100644 index 0000000000000..8bb4c11a056d5 --- /dev/null +++ b/app/code/Magento/GraphQl/Model/Backpressure/GraphQlTooManyRequestsException.php @@ -0,0 +1,54 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Model\Backpressure; + +use Exception; +use GraphQL\Error\ClientAware; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Phrase; + +/** + * Exception to GraphQL that is thrown when the user submits too many requests + */ +class GraphQlTooManyRequestsException extends LocalizedException implements ClientAware +{ + public const EXCEPTION_CATEGORY = 'graphql-too-many-requests'; + + /** + * @var boolean + */ + private $isSafe; + + /** + * @param Phrase $phrase + * @param Exception|null $cause + * @param int $code + * @param bool $isSafe + */ + public function __construct(Phrase $phrase, Exception $cause = null, int $code = 0, bool $isSafe = true) + { + $this->isSafe = $isSafe; + parent::__construct($phrase, $cause, $code); + } + + /** + * @inheritdoc + */ + public function isClientSafe(): bool + { + return $this->isSafe; + } + + /** + * @inheritdoc + */ + public function getCategory(): string + { + return self::EXCEPTION_CATEGORY; + } +} diff --git a/app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php b/app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php new file mode 100644 index 0000000000000..aeec59e21f399 --- /dev/null +++ b/app/code/Magento/GraphQl/Model/Backpressure/RequestTypeExtractorInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Model\Backpressure; + +use Magento\Framework\GraphQl\Config\Element\Field; + +/** + * Extracts request type for fields + */ +interface RequestTypeExtractorInterface +{ + /** + * Extracts type ID if possible + * + * @param Field $field + * @return string|null + */ + public function extract(Field $field): ?string; +} diff --git a/app/code/Magento/GraphQl/Test/Unit/Model/Backpressure/BackpressureContextFactoryTest.php b/app/code/Magento/GraphQl/Test/Unit/Model/Backpressure/BackpressureContextFactoryTest.php new file mode 100644 index 0000000000000..e3009d73723f7 --- /dev/null +++ b/app/code/Magento/GraphQl/Test/Unit/Model/Backpressure/BackpressureContextFactoryTest.php @@ -0,0 +1,132 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Test\Unit\Model\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\Framework\App\RequestInterface; +use Magento\GraphQl\Model\Backpressure\BackpressureContextFactory; +use Magento\GraphQl\Model\Backpressure\GraphQlContext; +use Magento\GraphQl\Model\Backpressure\RequestTypeExtractorInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class BackpressureContextFactoryTest extends TestCase +{ + /** + * @var RequestInterface|MockObject + */ + private $request; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @var RequestTypeExtractorInterface|MockObject + */ + private $requestTypeExtractor; + + /** + * @var BackpressureContextFactory + */ + private $model; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->request = $this->createMock(RequestInterface::class); + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->requestTypeExtractor = $this->createMock(RequestTypeExtractorInterface::class); + + $this->model = new BackpressureContextFactory( + $this->requestTypeExtractor, + $this->identityProvider, + $this->request + ); + } + + /** + * Verify that no context is available for empty request type. + * + * @return void + */ + public function testCreateForEmptyTypeReturnNull(): void + { + $this->requestTypeExtractor->method('extract')->willReturn(null); + + $this->assertNull($this->model->create($this->createField('test'))); + } + + /** + * Different identities. + * + * @return array + */ + public function getIdentityCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1' + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42' + ], + 'admin' => [ + ContextInterface::IDENTITY_TYPE_ADMIN, + '42' + ] + ]; + } + + /** + * Verify that identity is created for customers. + * + * @param int $identityType + * @param string $identity + * @return void + * @dataProvider getIdentityCases + */ + public function testCreateForIdentity(int $identityType, string $identity): void + { + $this->requestTypeExtractor->method('extract')->willReturn($typeId = 'test'); + $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); + $this->identityProvider->method('fetchIdentity')->willReturn($identity); + + /** @var GraphQlContext $context */ + $context = $this->model->create($this->createField($resolver = 'TestResolver')); + $this->assertNotNull($context); + $this->assertEquals($identityType, $context->getIdentityType()); + $this->assertEquals($identity, $context->getIdentity()); + $this->assertEquals($typeId, $context->getTypeId()); + $this->assertEquals($resolver, $context->getResolverClass()); + } + + /** + * Create Field instance. + * + * @param string $resolver + * @return Field + */ + private function createField(string $resolver): Field + { + $mock = $this->createMock(Field::class); + $mock->method('getResolver')->willReturn($resolver); + + return $mock; + } +} diff --git a/app/code/Magento/GraphQl/etc/di.xml b/app/code/Magento/GraphQl/etc/di.xml index 76bfb2118dc34..85a2636fdaba8 100644 --- a/app/code/Magento/GraphQl/etc/di.xml +++ b/app/code/Magento/GraphQl/etc/di.xml @@ -111,4 +111,15 @@ </argument> </arguments> </type> + <type name="Magento\Framework\GraphQl\Query\Resolver\Argument\Validator\CompositeValidator"> + <arguments> + <argument name="validators" xsi:type="array"> + <item name="backpressureValidator" xsi:type="object"> + Magento\GraphQl\Model\Backpressure\BackpressureFieldValidator + </item> + </argument> + </arguments> + </type> + <preference for="Magento\GraphQl\Model\Backpressure\RequestTypeExtractorInterface" + type="Magento\GraphQl\Model\Backpressure\CompositeRequestTypeExtractor"/> </config> diff --git a/app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php b/app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php new file mode 100644 index 0000000000000..7c1ab32dbd979 --- /dev/null +++ b/app/code/Magento/InstantPurchase/Model/BackpressureTypeExtractor.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\InstantPurchase\Model; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Request\Backpressure\RequestTypeExtractorInterface; +use Magento\Framework\App\RequestInterface; +use Magento\InstantPurchase\Controller\Button\PlaceOrder; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; + +/** + * Apply backpressure to instant purchase + */ +class BackpressureTypeExtractor implements RequestTypeExtractorInterface +{ + /** + * @var OrderLimitConfigManager + */ + private OrderLimitConfigManager $configManager; + + /** + * @param OrderLimitConfigManager $configManager + */ + public function __construct(OrderLimitConfigManager $configManager) + { + $this->configManager = $configManager; + } + + /** + * @inheritDoc + */ + public function extract(RequestInterface $request, ActionInterface $action): ?string + { + if ($action instanceof PlaceOrder && $this->configManager->isEnforcementEnabled()) { + return OrderLimitConfigManager::REQUEST_TYPE_ID; + } + + return null; + } +} diff --git a/app/code/Magento/InstantPurchase/etc/di.xml b/app/code/Magento/InstantPurchase/etc/di.xml index def091d285da3..40debf28e2540 100644 --- a/app/code/Magento/InstantPurchase/etc/di.xml +++ b/app/code/Magento/InstantPurchase/etc/di.xml @@ -23,4 +23,14 @@ </argument> </arguments> </type> + + <type name="Magento\Framework\App\Request\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="instantpurchase" xsi:type="object"> + Magento\InstantPurchase\Model\BackpressureTypeExtractor + </item> + </argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php b/app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php new file mode 100644 index 0000000000000..10286d8453c85 --- /dev/null +++ b/app/code/Magento/Quote/Model/Backpressure/Config/LimitValue.php @@ -0,0 +1,35 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Model\Backpressure\Config; + +use Magento\Framework\App\Config\Value; +use Magento\Framework\Exception\LocalizedException; + +/** + * Handles backpressure limit config value + */ +class LimitValue extends Value +{ + /** + * @inheritDoc + * + * @throws LocalizedException + */ + public function beforeSave() + { + if ($this->isValueChanged()) { + $value = (int) $this->getValue(); + if ($value < 1) { + throw new LocalizedException(__('Number above 0 is required for the limit')); + } + } + + return $this; + } +} diff --git a/app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php b/app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php new file mode 100644 index 0000000000000..82df3ac0beb0f --- /dev/null +++ b/app/code/Magento/Quote/Model/Backpressure/Config/PeriodSource.php @@ -0,0 +1,29 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Model\Backpressure\Config; + +use Magento\Framework\Data\OptionSourceInterface; + +/** + * Provides selection of limited periods + */ +class PeriodSource implements OptionSourceInterface +{ + /** + * @inheritDoc + */ + public function toOptionArray() + { + return [ + '60' => ['value' => '60', 'label' => __('Minute')], + '3600' => ['value' => '3600', 'label' => __('Hour')], + '86400' => ['value' => '86400', 'label' => __('Day')] + ]; + } +} diff --git a/app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php b/app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php new file mode 100644 index 0000000000000..da80bd96f7089 --- /dev/null +++ b/app/code/Magento/Quote/Model/Backpressure/Config/PeriodValue.php @@ -0,0 +1,76 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Model\Backpressure\Config; + +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\Config\Value; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Model\Context; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; + +/** + * Handles backpressure "period" config value + */ +class PeriodValue extends Value +{ + /** + * @var PeriodSource + */ + private PeriodSource $source; + + /** + * @param Context $context + * @param Registry $registry + * @param ScopeConfigInterface $config + * @param TypeListInterface $cacheTypeList + * @param PeriodSource $source + * @param AbstractResource|null $resource + * @param AbstractDb|null $resourceCollection + * @param array $data + */ + public function __construct( + Context $context, + Registry $registry, + ScopeConfigInterface $config, + TypeListInterface $cacheTypeList, + PeriodSource $source, + AbstractResource $resource = null, + AbstractDb $resourceCollection = null, + array $data = [] + ) { + parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); + $this->source = $source; + } + + /** + * @inheritDoc + * + * @throws LocalizedException + */ + public function beforeSave() + { + if ($this->isValueChanged()) { + $value = (string)$this->getValue(); + $availableValues = $this->source->toOptionArray(); + if (!array_key_exists($value, $availableValues)) { + throw new LocalizedException( + __( + 'Please select a valid rate limit period in seconds: %1', + implode(', ', array_keys($availableValues)) + ) + ); + } + } + + return $this; + } +} diff --git a/app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php b/app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php new file mode 100644 index 0000000000000..e37504b0ac84c --- /dev/null +++ b/app/code/Magento/Quote/Model/Backpressure/OrderLimitConfigManager.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Model\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfig; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Exception\RuntimeException; +use Magento\Store\Model\ScopeInterface; + +/** + * Provides backpressure limits for ordering + */ +class OrderLimitConfigManager implements LimitConfigManagerInterface +{ + public const REQUEST_TYPE_ID = 'quote-order'; + + /** + * @var ScopeConfigInterface + */ + private ScopeConfigInterface $config; + + /** + * @param ScopeConfigInterface $config + */ + public function __construct(ScopeConfigInterface $config) + { + $this->config = $config; + } + + /** + * @inheritDoc + * + * @throws RuntimeException + */ + public function readLimit(ContextInterface $context): LimitConfig + { + switch ($context->getIdentityType()) { + case ContextInterface::IDENTITY_TYPE_ADMIN: + case ContextInterface::IDENTITY_TYPE_CUSTOMER: + $limit = $this->fetchAuthenticatedLimit(); + break; + case ContextInterface::IDENTITY_TYPE_IP: + $limit = $this->fetchGuestLimit(); + break; + default: + throw new RuntimeException(__("Identity type not found")); + } + + return new LimitConfig($limit, $this->fetchPeriod()); + } + + /** + * Checks if enforcement enabled for the current store + * + * @return bool + */ + public function isEnforcementEnabled(): bool + { + return $this->config->isSetFlag('sales/backpressure/enabled', ScopeInterface::SCOPE_STORE); + } + + /** + * Limit for authenticated customers + * + * @return int + */ + private function fetchAuthenticatedLimit(): int + { + return (int)$this->config->getValue('sales/backpressure/limit', ScopeInterface::SCOPE_STORE); + } + + /** + * Limit for guests + * + * @return int + */ + private function fetchGuestLimit(): int + { + return (int)$this->config->getValue( + 'sales/backpressure/guest_limit', + ScopeInterface::SCOPE_STORE + ); + } + + /** + * Counter reset period + * + * @return int + */ + private function fetchPeriod(): int + { + return (int)$this->config->getValue('sales/backpressure/period', ScopeInterface::SCOPE_STORE); + } +} diff --git a/app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php b/app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php new file mode 100644 index 0000000000000..09b6ea3cd5557 --- /dev/null +++ b/app/code/Magento/Quote/Model/Backpressure/WebapiRequestTypeExtractor.php @@ -0,0 +1,49 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Model\Backpressure; + +use Magento\Framework\Webapi\Backpressure\BackpressureRequestTypeExtractorInterface; +use Magento\Quote\Api\CartManagementInterface; +use Magento\Quote\Api\GuestCartManagementInterface; + +/** + * Identifies which checkout related functionality needs backpressure management + */ +class WebapiRequestTypeExtractor implements BackpressureRequestTypeExtractorInterface +{ + private const METHOD = 'placeOrder'; + + /** + * @var OrderLimitConfigManager + */ + private OrderLimitConfigManager $config; + + /** + * @param OrderLimitConfigManager $config + */ + public function __construct(OrderLimitConfigManager $config) + { + $this->config = $config; + } + + /** + * @inheritDoc + */ + public function extract(string $service, string $method, string $endpoint): ?string + { + if (in_array($service, [CartManagementInterface::class, GuestCartManagementInterface::class]) + && $method === self::METHOD + && $this->config->isEnforcementEnabled() + ) { + return OrderLimitConfigManager::REQUEST_TYPE_ID; + } + + return null; + } +} diff --git a/app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php b/app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php new file mode 100644 index 0000000000000..93943b8eae76b --- /dev/null +++ b/app/code/Magento/Quote/Test/Unit/Model/Backpressure/OrderLimitConfigManagerTest.php @@ -0,0 +1,124 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Test\Unit\Model\Backpressure; + +use Magento\Framework\Exception\RuntimeException; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class OrderLimitConfigManagerTest extends TestCase +{ + /** + * @var ScopeConfigInterface|MockObject + */ + private $scopeConfigMock; + + /** + * @var OrderLimitConfigManager + */ + private OrderLimitConfigManager $model; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->scopeConfigMock = $this->createMock(ScopeConfigInterface::class); + + $this->model = new OrderLimitConfigManager($this->scopeConfigMock); + } + + /** + * Different config variations. + * + * @return array + */ + public function getConfigCases(): array + { + return [ + 'guest' => [ContextInterface::IDENTITY_TYPE_IP, 100, 50, 60, 100, 60], + 'authed' => [ContextInterface::IDENTITY_TYPE_CUSTOMER, 100, 50, 3600, 50, 3600], + ]; + } + + /** + * Verify that limit config is read from store config. + * + * @param int $identityType + * @param int $guestLimit + * @param int $authLimit + * @param int $period + * @param int $expectedLimit + * @param int $expectedPeriod + * @return void + * @dataProvider getConfigCases + * @throws RuntimeException + */ + public function testReadLimit( + int $identityType, + int $guestLimit, + int $authLimit, + int $period, + int $expectedLimit, + int $expectedPeriod + ): void { + $context = $this->createMock(ContextInterface::class); + $context->method('getIdentityType')->willReturn($identityType); + + $this->scopeConfigMock->method('getValue') + ->willReturnMap( + [ + ['sales/backpressure/limit', 'store', null, $authLimit], + ['sales/backpressure/guest_limit', 'store', null, $guestLimit], + ['sales/backpressure/period', 'store', null, $period], + ] + ); + + $limit = $this->model->readLimit($context); + $this->assertEquals($expectedLimit, $limit->getLimit()); + $this->assertEquals($expectedPeriod, $limit->getPeriod()); + } + + /** + * Verify logic behind enabled check + * + * @param bool $enabled + * @param bool $expected + * @return void + * @dataProvider getEnabledCases + */ + public function testIsEnforcementEnabled( + bool $enabled, + bool $expected + ): void { + $this->scopeConfigMock->method('isSetFlag') + ->with('sales/backpressure/enabled') + ->willReturn($enabled); + + $this->assertEquals($expected, $this->model->isEnforcementEnabled()); + } + + /** + * Config variations for enabled check. + * + * @return array + */ + public function getEnabledCases(): array + { + return [ + 'disabled' => [false, false], + 'enabled' => [true, true], + ]; + } +} diff --git a/app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php b/app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php new file mode 100644 index 0000000000000..b38072d40fa7f --- /dev/null +++ b/app/code/Magento/Quote/Test/Unit/Model/Backpressure/WebapiRequestTypeExtractorTest.php @@ -0,0 +1,71 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Test\Unit\Model\Backpressure; + +use Magento\Quote\Model\Backpressure\WebapiRequestTypeExtractor; +use PHPUnit\Framework\MockObject\MockObject; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use PHPUnit\Framework\TestCase; +use Magento\Quote\Api\CartManagementInterface; +use Magento\Quote\Api\GuestCartManagementInterface; + +/** + * Tests the WebapiRequestTypeExtractor class + */ +class WebapiRequestTypeExtractorTest extends TestCase +{ + /** + * @var OrderLimitConfigManager|MockObject + */ + private $configManagerMock; + + /** + * @var WebapiRequestTypeExtractor + */ + private WebapiRequestTypeExtractor $typeExtractor; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->configManagerMock = $this->createMock(OrderLimitConfigManager::class); + $this->typeExtractor = new WebapiRequestTypeExtractor($this->configManagerMock); + } + + /** + * Tests CompositeRequestTypeExtractor + * + * @param string $service + * @param string $method + * @param bool $isEnforcementEnabled + * @param mixed $expected + * @dataProvider dataProvider + */ + public function testExtract(string $service, string $method, bool $isEnforcementEnabled, $expected) + { + $this->configManagerMock->method('isEnforcementEnabled') + ->willReturn($isEnforcementEnabled); + + $this->assertEquals($expected, $this->typeExtractor->extract($service, $method, 'someEndPoint')); + } + + /** + * @return array[] + */ + public function dataProvider(): array + { + return [ + ['wrongService', 'wrongMethod', false, null], + [CartManagementInterface::class, 'wrongMethod', false, null], + [GuestCartManagementInterface::class, 'wrongMethod', false, null], + [GuestCartManagementInterface::class, 'placeOrder', false, null], + [GuestCartManagementInterface::class, 'placeOrder', true, 'quote-order'], + ]; + } +} diff --git a/app/code/Magento/Quote/etc/adminhtml/system.xml b/app/code/Magento/Quote/etc/adminhtml/system.xml index 6fc54f43c63fa..044102ca5a183 100644 --- a/app/code/Magento/Quote/etc/adminhtml/system.xml +++ b/app/code/Magento/Quote/etc/adminhtml/system.xml @@ -17,5 +17,36 @@ </field> </group> </section> + <section id="sales"> + <group id="backpressure" translate="label" type="text" sortOrder="1001" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Rate limiting</label> + <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Enable rate limiting for placing orders</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + </field> + <field id="limit" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Requests limit per authenticated customer</label> + <backend_model>Magento\Quote\Model\Backpressure\Config\LimitValue</backend_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="guest_limit" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Requests limit per guest</label> + <backend_model>Magento\Quote\Model\Backpressure\Config\LimitValue</backend_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="period" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Counter resets in a ...</label> + <source_model>Magento\Quote\Model\Backpressure\Config\PeriodSource</source_model> + <backend_model>Magento\Quote\Model\Backpressure\Config\PeriodValue</backend_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + </group> + </section> </system> </config> diff --git a/app/code/Magento/Quote/etc/config.xml b/app/code/Magento/Quote/etc/config.xml index c547e11c16357..c2be964b4eeec 100644 --- a/app/code/Magento/Quote/etc/config.xml +++ b/app/code/Magento/Quote/etc/config.xml @@ -12,5 +12,13 @@ <enable_inventory_check>1</enable_inventory_check> </options> </cataloginventory> + <sales> + <backpressure> + <enabled>0</enabled> + <limit>10</limit> + <guest_limit>50</guest_limit> + <period>60</period> + </backpressure> + </sales> </default> </config> diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 5ffc82d05e20f..496996d775413 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -144,4 +144,20 @@ <argument name="generalMessage" xsi:type="string" translatable="true">Enter a valid payment method and try again.</argument> </arguments> </type> + <type name="Magento\Framework\App\Backpressure\SlidingWindow\CompositeLimitConfigManager"> + <arguments> + <argument name="configs" xsi:type="array"> + <item name="quote-order" xsi:type="object"> + Magento\Quote\Model\Backpressure\OrderLimitConfigManager + </item> + </argument> + </arguments> + </type> + <type name="Magento\Framework\Webapi\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="quote" xsi:type="object">Magento\Quote\Model\Backpressure\WebapiRequestTypeExtractor</item> + </argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Quote/i18n/en_US.csv b/app/code/Magento/Quote/i18n/en_US.csv index c8da332f729c8..483b29a9fdbce 100644 --- a/app/code/Magento/Quote/i18n/en_US.csv +++ b/app/code/Magento/Quote/i18n/en_US.csv @@ -70,3 +70,7 @@ Carts,Carts "Validated Vat Number","Validated Vat Number" "Invalid Quote Item id %1","Invalid Quote Item id %1" "Invalid quote address id %1","Invalid quote address id %1" +"Number above 0 is required for the limit","Number above 0 is required for the limit" +"Please select a valid rate limit period in seconds: %1.","Please select a valid rate limit period in seconds: %1." +"Identity type not found","Identity type not found" +"Invalid order backpressure limit config","Invalid order backpressure limit config" diff --git a/app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php b/app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php new file mode 100644 index 0000000000000..45dea83df88af --- /dev/null +++ b/app/code/Magento/QuoteGraphQl/Model/BackpressureRequestTypeExtractor.php @@ -0,0 +1,62 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\QuoteGraphQl\Model; + +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\GraphQl\Model\Backpressure\RequestTypeExtractorInterface; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use Magento\QuoteGraphQl\Model\Resolver\PlaceOrder; +use Magento\QuoteGraphQl\Model\Resolver\SetPaymentAndPlaceOrder; + +/** + * Identifies which quote fields need backpressure management + */ +class BackpressureRequestTypeExtractor implements RequestTypeExtractorInterface +{ + /** + * @var OrderLimitConfigManager + */ + private OrderLimitConfigManager $config; + + /** + * @param OrderLimitConfigManager $config + */ + public function __construct(OrderLimitConfigManager $config) + { + $this->config = $config; + } + + /** + * @inheritDoc + */ + public function extract(Field $field): ?string + { + $fieldResolver = $this->resolver($field->getResolver()); + $placeOrderName = $this->resolver(PlaceOrder::class); + $setPaymentAndPlaceOrder = $this->resolver(SetPaymentAndPlaceOrder::class); + + if (($field->getResolver() === $setPaymentAndPlaceOrder || $placeOrderName === $fieldResolver) + && $this->config->isEnforcementEnabled() + ) { + return OrderLimitConfigManager::REQUEST_TYPE_ID; + } + + return null; + } + + /** + * Resolver to get exact class name + * + * @param string $class + * @return string + */ + private function resolver(string $class): string + { + return trim($class, '\\'); + } +} diff --git a/app/code/Magento/QuoteGraphQl/etc/di.xml b/app/code/Magento/QuoteGraphQl/etc/di.xml index 63eb001821c01..9ef81a2c39157 100644 --- a/app/code/Magento/QuoteGraphQl/etc/di.xml +++ b/app/code/Magento/QuoteGraphQl/etc/di.xml @@ -48,4 +48,13 @@ <argument name="informationShipping" xsi:type="object">Magento\Quote\Api\ShippingMethodManagementInterface</argument> </arguments> </type> + <type name="Magento\GraphQl\Model\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="checkout" xsi:type="object"> + Magento\QuoteGraphQl\Model\BackpressureRequestTypeExtractor + </item> + </argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php b/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php index 048c0d86bc312..ed3073b256542 100644 --- a/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php +++ b/app/code/Magento/Webapi/Controller/Rest/RequestValidator.php @@ -3,16 +3,23 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Webapi\Controller\Rest; +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\BackpressureEnforcerInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\AuthorizationException; use Magento\Framework\Webapi\Authorization; use Magento\Framework\Webapi\Rest\Request as RestRequest; use Magento\Store\Model\StoreManagerInterface; +use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; +use Magento\Framework\Webapi\Exception as WebapiException; +use Magento\Webapi\Controller\Rest\Router\Route; /** - * This class is responsible for validating the request + * Validates a request */ class RequestValidator { @@ -37,55 +44,113 @@ class RequestValidator private $authorization; /** - * Initialize dependencies - * + * @var BackpressureContextFactory + */ + private BackpressureContextFactory $backpressureContextFactory; + + /** + * @var BackpressureEnforcerInterface + */ + private BackpressureEnforcerInterface $backpressureEnforcer; + + /** * @param RestRequest $request * @param Router $router * @param StoreManagerInterface $storeManager * @param Authorization $authorization + * @param BackpressureContextFactory|null $backpressureContextFactory + * @param BackpressureEnforcerInterface|null $backpressureEnforcer */ public function __construct( RestRequest $request, Router $router, StoreManagerInterface $storeManager, - Authorization $authorization + Authorization $authorization, + ?BackpressureContextFactory $backpressureContextFactory = null, + ?BackpressureEnforcerInterface $backpressureEnforcer = null ) { $this->request = $request; $this->router = $router; $this->storeManager = $storeManager; $this->authorization = $authorization; + $this->backpressureContextFactory = $backpressureContextFactory + ?? ObjectManager::getInstance()->get(BackpressureContextFactory::class); + $this->backpressureEnforcer = $backpressureEnforcer + ?? ObjectManager::getInstance()->get(BackpressureEnforcerInterface::class); } /** - * Validate request + * Validates the request * * @throws AuthorizationException - * @throws \Magento\Framework\Webapi\Exception + * @throws WebapiException * @return void */ public function validate() { - $this->checkPermissions(); $route = $this->router->match($this->request); + $this->checkPermissions($route); + $this->onlyHttps($route); + $this->checkBackpressure($route); + } + + /** + * Perform authentication and authorization + * + * @param Route $route + * @return void + * @throws AuthorizationException + */ + private function checkPermissions(Route $route) + { + if ($this->authorization->isAllowed($route->getAclResources())) { + return; + } + + throw new AuthorizationException( + __( + "The consumer isn't authorized to access %resources.", + ['resources' => implode(', ', $route->getAclResources())] + ) + ); + } + + /** + * Checks if operation allowed only in HTTPS + * + * @param Route $route + * @throws WebapiException + */ + private function onlyHttps(Route $route) + { if ($route->isSecure() && !$this->request->isSecure()) { - throw new \Magento\Framework\Webapi\Exception(__('Operation allowed only in HTTPS')); + throw new WebapiException(__('Operation allowed only in HTTPS')); } } /** - * Perform authentication and authorization. + * Checks backpressure * - * @throws \Magento\Framework\Exception\AuthorizationException - * @return void + * @param Route $route + * @throws WebapiException */ - private function checkPermissions() + private function checkBackpressure(Route $route) { - $route = $this->router->match($this->request); - if (!$this->authorization->isAllowed($route->getAclResources())) { - $params = ['resources' => implode(', ', $route->getAclResources())]; - throw new AuthorizationException( - __("The consumer isn't authorized to access %resources.", $params) - ); + $context = $this->backpressureContextFactory->create( + $route->getServiceClass(), + $route->getServiceMethod(), + $route->getRoutePath() + ); + if ($context) { + try { + $this->backpressureEnforcer->enforce($context); + } catch (BackpressureExceededException $exception) { + throw new WebapiException( + __('Too Many Requests'), + 0, + WebapiException::HTTP_TOO_MANY_REQUESTS + ); + } } } } diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php index bc89565267d8a..2768b3fab5620 100644 --- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php +++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php @@ -12,11 +12,14 @@ use Magento\Framework\Api\ExtensibleDataInterface; use Magento\Framework\Api\MetadataObjectInterface; use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\BackpressureEnforcerInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Webapi\Authorization; use Magento\Framework\Exception\AuthorizationException; use Magento\Framework\Reflection\DataObjectProcessor; +use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; use Magento\Framework\Webapi\ServiceInputProcessor; use Magento\Framework\Webapi\Request as WebapiRequest; use Magento\Framework\Webapi\Exception as WebapiException; @@ -27,9 +30,9 @@ use Magento\Webapi\Model\ServiceMetadata; /** - * Handler of requests to SOAP server. + * Handler of requests to SOAP server * - * The main responsibility is to instantiate proper action controller (service) and execute requested method on it. + * The main responsibility is to instantiate proper action controller (service) and execute requested method on it * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -82,14 +85,22 @@ class Handler */ private $paramsOverrider; + /** + * @var BackpressureContextFactory + */ + private BackpressureContextFactory $backpressureContextFactory; + + /** + * @var BackpressureEnforcerInterface + */ + private BackpressureEnforcerInterface $backpressureEnforcer; + /** * @var InputArraySizeLimitValue */ private $inputArraySizeLimitValue; /** - * Initialize dependencies. - * * @param WebapiRequest $request * @param ObjectManagerInterface $objectManager * @param SoapConfig $apiConfig @@ -100,6 +111,8 @@ class Handler * @param MethodsMap $methodsMapProcessor * @param ParamsOverrider|null $paramsOverrider * @param InputArraySizeLimitValue|null $inputArraySizeLimitValue + * @param BackpressureContextFactory|null $backpressureContextFactory + * @param BackpressureEnforcerInterface|null $backpressureEnforcer * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -112,7 +125,9 @@ public function __construct( DataObjectProcessor $dataObjectProcessor, MethodsMap $methodsMapProcessor, ?ParamsOverrider $paramsOverrider = null, - ?InputArraySizeLimitValue $inputArraySizeLimitValue = null + ?InputArraySizeLimitValue $inputArraySizeLimitValue = null, + ?BackpressureContextFactory $backpressureContextFactory = null, + ?BackpressureEnforcerInterface $backpressureEnforcer = null ) { $this->_request = $request; $this->_objectManager = $objectManager; @@ -123,12 +138,16 @@ public function __construct( $this->_dataObjectProcessor = $dataObjectProcessor; $this->methodsMapProcessor = $methodsMapProcessor; $this->paramsOverrider = $paramsOverrider ?? ObjectManager::getInstance()->get(ParamsOverrider::class); - $this->inputArraySizeLimitValue = $inputArraySizeLimitValue ?? ObjectManager::getInstance() - ->get(InputArraySizeLimitValue::class); + $this->inputArraySizeLimitValue = $inputArraySizeLimitValue + ?? ObjectManager::getInstance()->get(InputArraySizeLimitValue::class); + $this->backpressureContextFactory = $backpressureContextFactory + ?? ObjectManager::getInstance()->get(BackpressureContextFactory::class); + $this->backpressureEnforcer = $backpressureEnforcer + ?? ObjectManager::getInstance()->get(BackpressureEnforcerInterface::class); } /** - * Handler for all SOAP operations. + * Handler for all SOAP operations * * @param string $operation * @param array $arguments @@ -136,6 +155,8 @@ public function __construct( * @throws WebapiException * @throws \LogicException * @throws AuthorizationException + * phpcs:disable Magento2.Functions.DiscouragedFunction + * phpcs:disable Generic.PHP.NoSilencedErrors */ public function __call($operation, $arguments) { @@ -149,6 +170,9 @@ public function __call($operation, $arguments) throw new WebapiException(__("Operation allowed only in HTTPS")); } + //Backpressure enforcement + $this->backpressureEnforcement($serviceMethodInfo['class'], $serviceMethodInfo['method'], $operation); + if (!$this->authorization->isAllowed($serviceMethodInfo[ServiceMetadata::KEY_ACL_RESOURCES])) { throw new AuthorizationException( __( @@ -259,4 +283,28 @@ protected function _prepareResponseData($data, $serviceClassName, $serviceMethod } return [self::RESULT_NODE_NAME => $result]; } + + /** + * Backpressure enforcement + * + * @param string $class + * @param string $method + * @param string $operation + * @throws WebapiException + */ + private function backpressureEnforcement(string $class, string $method, string $operation) + { + $context = $this->backpressureContextFactory->create($class, $method, $operation); + if ($context) { + try { + $this->backpressureEnforcer->enforce($context); + } catch (BackpressureExceededException $exception) { + throw new WebapiException( + __('Too Many Requests'), + 0, + WebapiException::HTTP_TOO_MANY_REQUESTS + ); + } + } + } } diff --git a/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php b/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php index e0fc834f75eb3..e25803af2536b 100644 --- a/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Controller/Rest/RequestValidatorTest.php @@ -20,9 +20,11 @@ class RequestValidatorTest extends TestCase { - const SERVICE_METHOD = 'testMethod'; + public const SERVICE_METHOD = 'testMethod'; - const SERVICE_ID = 'Magento\Webapi\Controller\Rest\TestService'; + public const SERVICE_ID = 'Magento\Webapi\Controller\Rest\TestService'; + + public const SERVICE_PATH = '/V1/test-service'; /** * @var RequestValidator @@ -74,7 +76,6 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMock(); $this->routeMock = $this->getMockBuilder(Route::class) - ->setMethods(['isSecure', 'getServiceMethod', 'getServiceClass', 'getAclResources', 'getParameters']) ->disableOriginalConstructor() ->getMock(); $this->authorizationMock = $this->getMockBuilder(Authorization::class) @@ -100,6 +101,7 @@ protected function setUp(): void $this->routeMock->expects($this->any())->method('getServiceClass')->willReturn(self::SERVICE_ID); $this->routeMock->expects($this->any())->method('getServiceMethod') ->willReturn(self::SERVICE_METHOD); + $this->routeMock->expects($this->any())->method('getRoutePath')->willReturn(self::SERVICE_PATH); $routerMock->expects($this->any())->method('match')->willReturn($this->routeMock); parent::setUp(); diff --git a/app/code/Magento/Webapi/i18n/en_US.csv b/app/code/Magento/Webapi/i18n/en_US.csv index 6384b3231d6b0..36a2cce11d6bc 100644 --- a/app/code/Magento/Webapi/i18n/en_US.csv +++ b/app/code/Magento/Webapi/i18n/en_US.csv @@ -22,3 +22,4 @@ Message,Message "If empty, UTF-8 will be used.","If empty, UTF-8 will be used." "Web Services Configuration","Web Services Configuration" "REST and SOAP configurations, generated WSDL file","REST and SOAP configurations, generated WSDL file" +"Too Many Requests","Too Many Requests" diff --git a/app/etc/di.xml b/app/etc/di.xml index 6056a54c66468..099dd84d83e76 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -1784,6 +1784,9 @@ <item name="http_method_validator" xsi:type="object"> Magento\Framework\App\Request\HttpMethodValidator </item> + <item name="backpressure" xsi:type="object"> + Magento\Framework\App\Request\BackpressureValidator + </item> </argument> </arguments> </virtualType> @@ -1976,5 +1979,27 @@ <argument name="defaultPageSize" xsi:type="number">999999</argument> </arguments> </type> + <preference for="Magento\Framework\App\BackpressureEnforcerInterface" + type="Magento\Framework\App\Backpressure\SlidingWindow\SlidingWindowEnforcer"/> + <preference for="Magento\Framework\App\Backpressure\SlidingWindow\RequestLoggerFactoryInterface" + type="Magento\Framework\App\Backpressure\SlidingWindow\RequestLoggerFactory"/> + <preference for="Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface" + type="Magento\Framework\App\Backpressure\SlidingWindow\CompositeLimitConfigManager"/> + <preference for="Magento\Framework\App\Request\Backpressure\RequestTypeExtractorInterface" + type="Magento\Framework\App\Request\Backpressure\CompositeRequestTypeExtractor"/> + <preference for="Magento\Framework\Webapi\Backpressure\BackpressureRequestTypeExtractorInterface" + type="Magento\Framework\Webapi\Backpressure\CompositeRequestTypeExtractor" /> + <type name="Magento\Framework\App\Request\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array" /> + </arguments> + </type> + <type name="Magento\Framework\App\Backpressure\SlidingWindow\RequestLoggerFactory"> + <arguments> + <argument name="types" xsi:type="array"> + <item name="redis" xsi:type="string">\Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger</item> + </argument> + </arguments> + </type> <preference for="Magento\Framework\Filter\Input\PurifierInterface" type="Magento\Framework\Filter\Input\Purifier"/> </config> diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php new file mode 100644 index 0000000000000..7bb3564b51859 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Controller/Read/Read.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleControllerBackpressure\Controller\Read; + +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\Response\Http as HttpResponse; + +class Read extends Action +{ + /** + * @var int + */ + private int $counter = 0; + + /** + * @inheritDoc + */ + public function execute() + { + /** @var HttpResponse $response */ + $response = $this->getResponse(); + return $response->representJson('{"str": "controller-read", "counter": ' .(++$this->counter) .'}'); + } + + public function resetCounter(): void + { + $this->counter = 0; + } + + public function getCounter(): int + { + return $this->counter; + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php new file mode 100644 index 0000000000000..5101e71cf9ee8 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/LimitConfigManager.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleControllerBackpressure\Model; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfig; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; + +class LimitConfigManager implements LimitConfigManagerInterface +{ + /** + * @inheritDoc + */ + public function readLimit(ContextInterface $context): LimitConfig + { + return new LimitConfig(2, 60); + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/TypeExtractor.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/TypeExtractor.php new file mode 100644 index 0000000000000..ccf3bbd1a1c16 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/Model/TypeExtractor.php @@ -0,0 +1,28 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleControllerBackpressure\Model; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Request\Backpressure\RequestTypeExtractorInterface; +use Magento\Framework\App\RequestInterface; + +class TypeExtractor implements RequestTypeExtractorInterface +{ + /** + * @inheritDoc + */ + public function extract(RequestInterface $request, ActionInterface $action): ?string + { + if ($action instanceof Index) { + return 'testcontrollerbackpressure'; + } + + return null; + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/composer.json b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/composer.json new file mode 100644 index 0000000000000..5cb6af58eb1b7 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/module-test-controller-backpressure", + "description": "test controller module", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.4.0||~8.0.0", + "magento/framework": "*", + "magento/module-integration": "*" + }, + "type": "magento2-module", + "extra": { + "map": [ + [ + "*", + "Magento/TestModuleControllerBackpressure" + ] + ] + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/di.xml b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/di.xml new file mode 100644 index 0000000000000..6a7e21696182b --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/di.xml @@ -0,0 +1,27 @@ +<?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\Request\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="controllertestbackpressure" xsi:type="object"> + Magento\TestModuleControllerBackpressure\Model\TypeExtractor + </item> + </argument> + </arguments> + </type> + <type name="Magento\Framework\App\Backpressure\SlidingWindow\CompositeLimitConfigManager"> + <arguments> + <argument name="configs" xsi:type="array"> + <item name="testcontrollerbackpressure" xsi:type="object"> + Magento\TestModuleControllerBackpressure\Model\LimitConfigManager + </item> + </argument> + </arguments> + </type> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/routes.xml new file mode 100644 index 0000000000000..ac0313adf9f2d --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/frontend/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="standard"> + <route id="testbackpressure" frontName="testbackpressure"> + <module name="Magento_TestModuleControllerBackpressure" /> + </route> + </router> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/etc/module.xml new file mode 100644 index 0000000000000..87ef08c0e281a --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/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_TestModuleControllerBackpressure" /> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/registration.php new file mode 100644 index 0000000000000..fa484c0a9f857 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleControllerBackpressure/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_TestModuleControllerBackpressure') === null) { + ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleControllerBackpressure', __DIR__); +} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php new file mode 100644 index 0000000000000..997d43ff32a29 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/LimitConfigManager.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleGraphQlBackpressure\Model; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfig; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; + +class LimitConfigManager implements LimitConfigManagerInterface +{ + /** + * @inheritDoc + */ + public function readLimit(ContextInterface $context): LimitConfig + { + return new LimitConfig(2, 60); + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TestServiceResolver.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TestServiceResolver.php new file mode 100644 index 0000000000000..35a0755054e14 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TestServiceResolver.php @@ -0,0 +1,41 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleGraphQlBackpressure\Model; + +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\Framework\GraphQl\Query\ResolverInterface; +use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; + +class TestServiceResolver implements ResolverInterface +{ + /** + * @var int + */ + private int $counter = 0; + + /** + * @inheritDoc + */ + public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) + { + $this->counter++; + + return ['str' => 'read']; + } + + public function resetCounter(): void + { + $this->counter = 0; + } + + public function getCounter(): int + { + return $this->counter; + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php new file mode 100644 index 0000000000000..cccc747dc6ba7 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/Model/TypeExtractor.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleGraphQlBackpressure\Model; + +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\GraphQl\Model\Backpressure\RequestTypeExtractorInterface; + +class TypeExtractor implements RequestTypeExtractorInterface +{ + /** + * @inheritDoc + */ + public function extract(Field $field): ?string + { + if ($field->getResolver() == TestServiceResolver::class) { + return 'testgraphqlbackpressure'; + } + + return null; + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json new file mode 100644 index 0000000000000..0dd27bb7f9dd2 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/module-test-graphql-backpressure", + "description": "test graphql module", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.4.0||~8.0.0", + "magento/framework": "*", + "magento/module-integration": "*" + }, + "type": "magento2-module", + "extra": { + "map": [ + [ + "*", + "Magento/TestModuleGraphQlBackpressure" + ] + ] + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml new file mode 100644 index 0000000000000..41195dbc025fa --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/di.xml @@ -0,0 +1,29 @@ +<?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\TestModuleGraphQlBackpressure\Api\TestReadServiceInterface" + type="Magento\TestModuleGraphQlBackpressure\Model\TestReadService" /> + <type name="Magento\GraphQl\Model\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="graphqltestbackpressure" xsi:type="object"> + Magento\TestModuleGraphQlBackpressure\Model\TypeExtractor + </item> + </argument> + </arguments> + </type> + <type name="Magento\Framework\App\Backpressure\SlidingWindow\CompositeLimitConfigManager"> + <arguments> + <argument name="configs" xsi:type="array"> + <item name="testgraphqlbackpressure" xsi:type="object"> + Magento\TestModuleGraphQlBackpressure\Model\LimitConfigManager + </item> + </argument> + </arguments> + </type> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/module.xml new file mode 100644 index 0000000000000..4e286010bbebf --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/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_TestModuleGraphQlBackpressure" /> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/routes.xml new file mode 100644 index 0000000000000..edffb1f4a3535 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/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="standard"> + <route id="moduletestgraphqlback" frontName="moduletestgraphqlback"> + <module name="Magento_TestModuleGraphQlBackpressure" /> + </route> + </router> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls new file mode 100644 index 0000000000000..28100445340e8 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/etc/schema.graphqls @@ -0,0 +1,10 @@ +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +type TestReadOutput { + str: String +} + +type Query { + testGraphqlRead: TestReadOutput @resolver(class: "Magento\\TestModuleGraphQlBackpressure\\Model\\TestServiceResolver") @cache(cacheable: false) +} diff --git a/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/registration.php new file mode 100644 index 0000000000000..660fb27e91f13 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleGraphQlBackpressure/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_TestModuleGraphQlBackpressure') === null) { + ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleGraphQlBackpressure', __DIR__); +} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php new file mode 100644 index 0000000000000..befec29700a95 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Api/TestReadServiceInterface.php @@ -0,0 +1,17 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleWebapiBackpressure\Api; + +interface TestReadServiceInterface +{ + /** + * @return string + */ + public function read(): string; +} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/LimitConfigManager.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/LimitConfigManager.php new file mode 100644 index 0000000000000..f02050b1561b1 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/LimitConfigManager.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleWebapiBackpressure\Model; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfig; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; + +class LimitConfigManager implements LimitConfigManagerInterface +{ + /** + * @inheritDoc + */ + public function readLimit(ContextInterface $context): LimitConfig + { + return new LimitConfig(2, 60); + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TestReadService.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TestReadService.php new file mode 100644 index 0000000000000..e0e9626db24e3 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TestReadService.php @@ -0,0 +1,39 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleWebapiBackpressure\Model; + +use Magento\TestModuleWebapiBackpressure\Api\TestReadServiceInterface; + +class TestReadService implements TestReadServiceInterface +{ + /** + * @var int + */ + private int $counter = 0; + + /** + * @inheritDoc + */ + public function read(): string + { + $this->counter++; + + return 'read'; + } + + public function resetCounter(): void + { + $this->counter = 0; + } + + public function getCounter(): int + { + return $this->counter; + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php new file mode 100644 index 0000000000000..d2db29fc6e5f5 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/Model/TypeExtractor.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\TestModuleWebapiBackpressure\Model; + +use Magento\Framework\Webapi\Backpressure\BackpressureRequestTypeExtractorInterface; +use Magento\TestModuleWebapiBackpressure\Api\TestReadServiceInterface; + +class TypeExtractor implements BackpressureRequestTypeExtractorInterface +{ + /** + * @inheritDoc + */ + public function extract(string $service, string $method, string $endpoint): ?string + { + if ($service == TestReadServiceInterface::class) { + return 'testwebapibackpressure'; + } + + return null; + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/composer.json b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/composer.json new file mode 100644 index 0000000000000..961bfdc9f1ec8 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/module-test-webapi-backpressure", + "description": "test webapi module", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.4.0||~8.0.0", + "magento/framework": "*", + "magento/module-integration": "*" + }, + "type": "magento2-module", + "extra": { + "map": [ + [ + "*", + "Magento/TestModuleWebapiBackpressure" + ] + ] + } +} diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/di.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/di.xml new file mode 100644 index 0000000000000..3a8eec904f467 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/di.xml @@ -0,0 +1,29 @@ +<?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\TestModuleWebapiBackpressure\Api\TestReadServiceInterface" + type="Magento\TestModuleWebapiBackpressure\Model\TestReadService" /> + <type name="Magento\Framework\Webapi\Backpressure\CompositeRequestTypeExtractor"> + <arguments> + <argument name="extractors" xsi:type="array"> + <item name="webapitestbackpressure" xsi:type="object"> + Magento\TestModuleWebapiBackpressure\Model\TypeExtractor + </item> + </argument> + </arguments> + </type> + <type name="Magento\Framework\App\Backpressure\SlidingWindow\CompositeLimitConfigManager"> + <arguments> + <argument name="configs" xsi:type="array"> + <item name="testwebapibackpressure" xsi:type="object"> + Magento\TestModuleWebapiBackpressure\Model\LimitConfigManager + </item> + </argument> + </arguments> + </type> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/module.xml new file mode 100644 index 0000000000000..8b4a777513130 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/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_TestModuleWebapiBackpressure" /> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/routes.xml new file mode 100644 index 0000000000000..265ea00cac212 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/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="standard"> + <route id="moduletestwebapiback" frontName="moduletestwebapiback"> + <module name="Magento_TestModuleWebapiBackpressure" /> + </route> + </router> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml new file mode 100644 index 0000000000000..0695a5db74285 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/etc/webapi.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"> + + <route url="/V1/test-module-webapi-backpressure/read" method="GET"> + <service class="Magento\TestModuleWebapiBackpressure\Api\TestReadServiceInterface" method="read"/> + <resources> + <resource ref="anonymous" /> + </resources> + </route> +</routes> diff --git a/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/registration.php new file mode 100644 index 0000000000000..7c69142380b7e --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleWebapiBackpressure/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_TestModuleWebapiBackpressure') === null) { + ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleWebapiBackpressure', __DIR__); +} diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php new file mode 100644 index 0000000000000..00964f5e1c5d9 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Checkout/Model/BackpressureTest.php @@ -0,0 +1,119 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Checkout\Model; + +use Magento\Checkout\Api\GuestPaymentInformationManagementInterface; +use Magento\Checkout\Api\PaymentInformationManagementInterface; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; +use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class BackpressureTest extends TestCase +{ + /** + * @var BackpressureContextFactory + */ + private $webapiContextFactory; + + /** + * @var LimitConfigManagerInterface + */ + private $limitConfigManager; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->webapiContextFactory = Bootstrap::getObjectManager()->create( + BackpressureContextFactory::class, + ['identityProvider' => $this->identityProvider] + ); + $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); + } + + /** + * Configured cases. + * + * @return array + */ + public function getConfiguredCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1', + GuestPaymentInformationManagementInterface::class, + 'savePaymentInformationAndPlaceOrder', + '/V1/guest-carts/:cartId/payment-information', + 50 + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42', + PaymentInformationManagementInterface::class, + 'savePaymentInformationAndPlaceOrder', + '/V1/carts/mine/payment-information', + 100 + ] + ]; + } + + /** + * Verify that backpressure is configured for guests. + * + * @param int $identityType + * @param string $identity + * @param string $service + * @param string $method + * @param string $endpoint + * @param int $expectedLimit + * @return void + * @dataProvider getConfiguredCases + * @magentoConfigFixture current_store sales/backpressure/enabled 1 + * @magentoConfigFixture current_store sales/backpressure/limit 100 + * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 + * @magentoConfigFixture current_store sales/backpressure/period 60 + */ + public function testConfigured( + int $identityType, + string $identity, + string $service, + string $method, + string $endpoint, + int $expectedLimit + ): void { + $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); + $this->identityProvider->method('fetchIdentity')->willReturn($identity); + + $context = $this->webapiContextFactory->create( + $service, + $method, + $endpoint + ); + $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); + + $limits = $this->limitConfigManager->readLimit($context); + $this->assertEquals($expectedLimit, $limits->getLimit()); + $this->assertEquals(60, $limits->getPeriod()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.php new file mode 100644 index 0000000000000..bf7b485ebfcf6 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/App/Backpressure/ControllerBackpressureTest.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\App\Backpressure; + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\AbstractController; +use Magento\TestModuleControllerBackpressure\Controller\Read\Read; + +/** + * @magentoAppArea frontend + */ +class ControllerBackpressureTest extends AbstractController +{ + /** + * @var Read + */ + private $index; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->index = Bootstrap::getObjectManager()->get(Read::class); + $this->index->resetCounter(); + } + + /** + * Verify that backpressure is enforced for controllers. + * + * @return void + */ + public function testBackpressure(): void + { + $nOfReqs = 6; + + for ($i = 0; $i < $nOfReqs; $i++) { + $this->dispatch('testbackpressure/read/read'); + } + + $counter = json_decode($this->getResponse()->getBody(), true)['counter']; + $this->assertGreaterThan(0, $counter); + $this->assertLessThan($nOfReqs, $counter); + } +} diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php new file mode 100644 index 0000000000000..ba26372132e63 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/GraphQl/Quote/BackpressureTest.php @@ -0,0 +1,110 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\GraphQl\Quote; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\GraphQl\Model\Backpressure\BackpressureContextFactory; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use Magento\QuoteGraphQl\Model\Resolver\SetPaymentAndPlaceOrder; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +use Magento\QuoteGraphQl\Model\Resolver\PlaceOrder; + +class BackpressureTest extends TestCase +{ + /** + * @var BackpressureContextFactory + */ + private $contextFactory; + + /** + * @var LimitConfigManagerInterface + */ + private $limitConfigManager; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->contextFactory = Bootstrap::getObjectManager()->create( + BackpressureContextFactory::class, + ['identityProvider' => $this->identityProvider] + ); + $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); + } + + /** + * Configured cases. + * + * @return array + */ + public function getConfiguredCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1', + SetPaymentAndPlaceOrder::class, + 50 + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42', + PlaceOrder::class, + 100 + ] + ]; + } + + /** + * Verify that backpressure is configured for guests. + * + * @param int $identityType + * @param string $identity + * @param string $resolver + * @param int $expectedLimit + * @return void + * @dataProvider getConfiguredCases + * @magentoConfigFixture current_store sales/backpressure/enabled 1 + * @magentoConfigFixture current_store sales/backpressure/limit 100 + * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 + * @magentoConfigFixture current_store sales/backpressure/period 60 + */ + public function testConfigured( + int $identityType, + string $identity, + string $resolver, + int $expectedLimit + ): void { + $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); + $this->identityProvider->method('fetchIdentity')->willReturn($identity); + + $field = $this->createMock(Field::class); + $field->method('getResolver')->willReturn($resolver); + $context = $this->contextFactory->create($field); + $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); + + $limits = $this->limitConfigManager->readLimit($context); + $this->assertEquals($expectedLimit, $limits->getLimit()); + $this->assertEquals(60, $limits->getPeriod()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php new file mode 100644 index 0000000000000..ae4825a8ccc6a --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/InstantPurchase/Model/BackpressureTest.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\InstantPurchase\Model; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; +use Magento\Framework\App\Request\Backpressure\ContextFactory; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +use Magento\InstantPurchase\Controller\Button\PlaceOrder; + +class BackpressureTest extends TestCase +{ + /** + * @var ContextFactory + */ + private $contextFactory; + + /** + * @var LimitConfigManagerInterface + */ + private $limitConfigManager; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->contextFactory = Bootstrap::getObjectManager()->create( + ContextFactory::class, + ['identityProvider' => $this->identityProvider] + ); + $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); + } + + /** + * Configured cases. + * + * @return array + */ + public function getConfiguredCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1', + 50 + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42', + 100 + ] + ]; + } + + /** + * Verify that backpressure is configured for guests. + * + * @param int $identityType + * @param string $identity + * @param int $expectedLimit + * @return void + * @dataProvider getConfiguredCases + * @magentoConfigFixture current_store sales/backpressure/enabled 1 + * @magentoConfigFixture current_store sales/backpressure/limit 100 + * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 + * @magentoConfigFixture current_store sales/backpressure/period 60 + */ + public function testConfigured( + int $identityType, + string $identity, + int $expectedLimit + ): void { + $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); + $this->identityProvider->method('fetchIdentity')->willReturn($identity); + + $context = $this->contextFactory->create($this->createMock(PlaceOrder::class)); + $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); + + $limits = $this->limitConfigManager->readLimit($context); + $this->assertEquals($expectedLimit, $limits->getLimit()); + $this->assertEquals(60, $limits->getPeriod()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php b/dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php new file mode 100644 index 0000000000000..cb64b08da5260 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Quote/Model/BackpressureTest.php @@ -0,0 +1,119 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Quote\Model; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; +use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; +use Magento\Quote\Api\CartManagementInterface; +use Magento\Quote\Api\GuestCartManagementInterface; +use Magento\Quote\Model\Backpressure\OrderLimitConfigManager; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class BackpressureTest extends TestCase +{ + /** + * @var BackpressureContextFactory + */ + private $webapiContextFactory; + + /** + * @var LimitConfigManagerInterface + */ + private $limitConfigManager; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->webapiContextFactory = Bootstrap::getObjectManager()->create( + BackpressureContextFactory::class, + ['identityProvider' => $this->identityProvider] + ); + $this->limitConfigManager = Bootstrap::getObjectManager()->get(LimitConfigManagerInterface::class); + } + + /** + * Configured cases. + * + * @return array + */ + public function getConfiguredCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1', + GuestCartManagementInterface::class, + 'placeOrder', + '/V1/guest-carts/:cartId/order', + 50 + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42', + CartManagementInterface::class, + 'placeOrder', + '/V1/carts/mine/order', + 100 + ] + ]; + } + + /** + * Verify that backpressure is configured for guests. + * + * @param int $identityType + * @param string $identity + * @param string $service + * @param string $method + * @param string $endpoint + * @param int $expectedLimit + * @return void + * @dataProvider getConfiguredCases + * @magentoConfigFixture current_store sales/backpressure/enabled 1 + * @magentoConfigFixture current_store sales/backpressure/limit 100 + * @magentoConfigFixture current_store sales/backpressure/guest_limit 50 + * @magentoConfigFixture current_store sales/backpressure/period 60 + */ + public function testConfigured( + int $identityType, + string $identity, + string $service, + string $method, + string $endpoint, + int $expectedLimit + ): void { + $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); + $this->identityProvider->method('fetchIdentity')->willReturn($identity); + + $context = $this->webapiContextFactory->create( + $service, + $method, + $endpoint + ); + $this->assertEquals(OrderLimitConfigManager::REQUEST_TYPE_ID, $context->getTypeId()); + + $limits = $this->limitConfigManager->readLimit($context); + $this->assertEquals($expectedLimit, $limits->getLimit()); + $this->assertEquals(60, $limits->getPeriod()); + } +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php b/lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php new file mode 100644 index 0000000000000..c1a0412c805a5 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/BackpressureExceededException.php @@ -0,0 +1,16 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure; + +/** + * Thrown when backpressure is exceeded + */ +class BackpressureExceededException extends \RuntimeException +{ +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/ContextInterface.php b/lib/internal/Magento/Framework/App/Backpressure/ContextInterface.php new file mode 100644 index 0000000000000..5d657421629f0 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/ContextInterface.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\App\Backpressure; + +use Magento\Framework\App\RequestInterface; + +/** + * Request context + */ +interface ContextInterface +{ + public const IDENTITY_TYPE_IP = 0; + + public const IDENTITY_TYPE_CUSTOMER = 1; + + public const IDENTITY_TYPE_ADMIN = 2; + + /** + * Current request + * + * @return RequestInterface + */ + public function getRequest(): RequestInterface; + + /** + * Unique ID for request issuer + * + * @return string + */ + public function getIdentity(): string; + + /** + * Type of identity detected + * + * @return int + */ + public function getIdentityType(): int; + + /** + * Request type ID + * + * String ID of the functionality that requires backpressure enforcement + * + * @return string + */ + public function getTypeId(): string; +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/IdentityProviderInterface.php b/lib/internal/Magento/Framework/App/Backpressure/IdentityProviderInterface.php new file mode 100644 index 0000000000000..d1de7d0879411 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/IdentityProviderInterface.php @@ -0,0 +1,29 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure; + +/** + * Provides identity for context + */ +interface IdentityProviderInterface +{ + /** + * One of ContextInterface constants + * + * @return int + */ + public function fetchIdentityType(): int; + + /** + * Identity string representation + * + * @return string + */ + public function fetchIdentity(): string; +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/CompositeLimitConfigManager.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/CompositeLimitConfigManager.php new file mode 100644 index 0000000000000..996ec1f266b5d --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/CompositeLimitConfigManager.php @@ -0,0 +1,50 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\Exception\RuntimeException; + +/** + * Delegates finding configs for different requests types to other instances + */ +class CompositeLimitConfigManager implements LimitConfigManagerInterface +{ + /** + * @var LimitConfigManagerInterface[] + */ + private array $configs; + + /** + * @param LimitConfigManagerInterface[] $configs + */ + public function __construct(array $configs) + { + $this->configs = $configs; + } + + /** + * @inheritDoc + * + * @throws RuntimeException + */ + public function readLimit(ContextInterface $context): LimitConfig + { + if (isset($this->configs[$context->getTypeId()])) { + return $this->configs[$context->getTypeId()]->readLimit($context); + } + + throw new RuntimeException( + __( + 'Failed to find config manager for "%typeId".', + [ 'typeId' => $context->getTypeId()] + ) + ); + } +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php new file mode 100644 index 0000000000000..137358f732b5d --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfig.php @@ -0,0 +1,55 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +/** + * Limit configuration + */ +class LimitConfig +{ + /** + * @var int + */ + private int $limit; + + /** + * @var int + */ + private int $period; + + /** + * @param int $limit + * @param int $period + */ + public function __construct(int $limit, int $period) + { + $this->limit = $limit; + $this->period = $period; + } + + /** + * Requests per period + * + * @return int + */ + public function getLimit(): int + { + return $this->limit; + } + + /** + * Period in seconds + * + * @return int + */ + public function getPeriod(): int + { + return $this->period; + } +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php new file mode 100644 index 0000000000000..94626a5874180 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/LimitConfigManagerInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\ContextInterface; + +/** + * Provides limit configuration for request contexts + */ +interface LimitConfigManagerInterface +{ + /** + * Find limits for given context + * + * @param ContextInterface $context + * @return LimitConfig + */ + public function readLimit(ContextInterface $context): LimitConfig; +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php new file mode 100644 index 0000000000000..7d57d3421c7b3 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php @@ -0,0 +1,112 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger\RedisClient; + +/** + * Logging requests to Redis + */ +class RedisRequestLogger implements RequestLoggerInterface +{ + /** + * Identifier for Redis Logger type + */ + public const BACKPRESSURE_LOGGER_REDIS = 'redis'; + + /** + * Default prefix id + */ + private const DEFAULT_PREFIX_ID = 'reqlog'; + + /** + * Config path for backpressure logger id prefix + */ + public const CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX = 'backpressure/logger/id-prefix'; + + /** + * @var RedisClient + */ + private $redisClient; + + /** + * @var DeploymentConfig + */ + private $deploymentConfig; + + /** + * @param RedisClient $redisClient + * @param DeploymentConfig $deploymentConfig + */ + public function __construct( + RedisClient $redisClient, + DeploymentConfig $deploymentConfig + ) { + $this->redisClient = $redisClient; + $this->deploymentConfig = $deploymentConfig; + } + + /** + * @inheritDoc + */ + public function incrAndGetFor(ContextInterface $context, int $timeSlot, int $discardAfter): int + { + $id = $this->generateId($context, $timeSlot); + $this->redisClient->incrBy($id, 1); + $this->redisClient->expireAt($id, time() + $discardAfter); + + return (int)$this->redisClient->exec()[0]; + } + + /** + * @inheritDoc + */ + public function getFor(ContextInterface $context, int $timeSlot): ?int + { + $value = $this->redisClient->get($this->generateId($context, $timeSlot)); + + return $value ? (int)$value : null; + } + + /** + * Generate cache ID based on context + * + * @param ContextInterface $context + * @param int $timeSlot + * @return string + */ + private function generateId(ContextInterface $context, int $timeSlot): string + { + return $this->getPrefixId() + . $context->getTypeId() + . $context->getIdentityType() + . $context->getIdentity() + . $timeSlot; + } + + /** + * Returns prefix id + * + * @return string + */ + private function getPrefixId(): string + { + try { + return (string)$this->deploymentConfig->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, + self::DEFAULT_PREFIX_ID + ); + } catch (RuntimeException | FileSystemException $e) { + return self::DEFAULT_PREFIX_ID; + } + } +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php new file mode 100644 index 0000000000000..3d1621927091d --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php @@ -0,0 +1,249 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger; + +use Credis_Client; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\RuntimeException; + +/** + * Redis client for request logger + */ +class RedisClient +{ + /** + * Keys for Redis settings + */ + public const KEY_HOST = 'host'; + public const KEY_PORT = 'port'; + public const KEY_TIMEOUT = 'timeout'; + public const KEY_PERSISTENT = 'persistent'; + public const KEY_DB = 'db'; + public const KEY_PASSWORD = 'password'; + public const KEY_USER = 'user'; + + /** + * Configuration paths for Redis settings + */ + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER = 'backpressure/logger/options/server'; + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT = 'backpressure/logger/options/port'; + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT = 'backpressure/logger/options/timeout'; + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT = 'backpressure/logger/options/persistent'; + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB = 'backpressure/logger/options/db'; + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD = 'backpressure/logger/options/password'; + public const CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER = 'backpressure/logger/options/user'; + + /** + * Redis default settings + */ + public const DEFAULT_REDIS_CONFIG_VALUES = [ + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER => '127.0.0.1', + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT => 6379, + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT => null, + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT => '', + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB => 3, + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD => null, + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER => null, + ]; + + /** + * Config map + */ + public const KEY_CONFIG_PATH_MAP = [ + self::KEY_HOST => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER, + self::KEY_PORT => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT, + self::KEY_TIMEOUT => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, + self::KEY_PERSISTENT => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, + self::KEY_DB => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB, + self::KEY_PASSWORD => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD, + self::KEY_USER => self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER, + ]; + + /** + * @var Credis_Client + */ + private $pipeline; + + /** + * @param DeploymentConfig $config + * @throws FileSystemException + * @throws RuntimeException + */ + public function __construct(DeploymentConfig $config) + { + $credisClient = new Credis_Client( + $this->getHost($config), + $this->getPort($config), + $this->getTimeout($config), + $this->getPersistent($config), + $this->getDb($config), + $this->getPassword($config), + $this->getUser($config) + ); + + $this->pipeline = $credisClient->pipeline(); + } + + /** + * Increments given key value + * + * @param string $key + * @param int $decrement + * @return Credis_Client|int + */ + public function incrBy(string $key, int $decrement) + { + return $this->pipeline->incrBy($key, $decrement); + } + + /** + * Sets expiration date of the key + * + * @param string $key + * @param int $timestamp + * @return Credis_Client|int + */ + public function expireAt(string $key, int $timestamp) + { + return $this->pipeline->expireAt($key, $timestamp); + } + + /** + * Returns value by key + * + * @param string $key + * @return bool|Credis_Client|string + */ + public function get(string $key) + { + return $this->pipeline->get($key); + } + + /** + * Execute statement + * + * @return array + */ + public function exec(): array + { + return $this->pipeline->exec(); + } + + /** + * Returns Redis host + * + * @param DeploymentConfig $config + * @return string + * @throws FileSystemException + * @throws RuntimeException + */ + private function getHost(DeploymentConfig $config): string + { + return $config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER] + ); + } + + /** + * Returns Redis port + * + * @param DeploymentConfig $config + * @return int + * @throws FileSystemException + * @throws RuntimeException + */ + private function getPort(DeploymentConfig $config): int + { + return (int)$config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT] + ); + } + + /** + * Returns Redis timeout + * + * @param DeploymentConfig $config + * @return float|null + * @throws FileSystemException + * @throws RuntimeException + */ + private function getTimeout(DeploymentConfig $config): ?float + { + return (float)$config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT] + ); + } + + /** + * Returns Redis persistent + * + * @param DeploymentConfig $config + * @return string + * @throws FileSystemException + * @throws RuntimeException + */ + private function getPersistent(DeploymentConfig $config): string + { + return $config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT] + ); + } + + /** + * Returns Redis db + * + * @param DeploymentConfig $config + * @return int + * @throws FileSystemException + * @throws RuntimeException + */ + private function getDb(DeploymentConfig $config): int + { + return (int)$config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB] + ); + } + + /** + * Returns Redis password + * + * @param DeploymentConfig $config + * @return string|null + * @throws FileSystemException + * @throws RuntimeException + */ + private function getPassword(DeploymentConfig $config): ?string + { + return $config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD] + ); + } + + /** + * Returns Redis user + * + * @param DeploymentConfig $config + * @return string|null + * @throws FileSystemException + * @throws RuntimeException + */ + private function getUser(DeploymentConfig $config): ?string + { + return $config->get( + self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER, + self::DEFAULT_REDIS_CONFIG_VALUES[self::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER] + ); + } +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.php new file mode 100644 index 0000000000000..61ad16f8969fe --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactory.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\App\Backpressure\SlidingWindow; + +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\ObjectManagerInterface; + +/** + * Creates Backpressure Logger by type + */ +class RequestLoggerFactory implements RequestLoggerFactoryInterface +{ + /** + * @var ObjectManagerInterface + */ + private ObjectManagerInterface $objectManager; + + /** + * @var array + */ + private array $types; + + /** + * @param ObjectManagerInterface $objectManager + * @param array $types + */ + public function __construct(ObjectManagerInterface $objectManager, array $types) + { + $this->types = $types; + $this->objectManager = $objectManager; + } + + /** + * @inheritDoc + * + * @param string $type + * @return RequestLoggerInterface + * @throws RuntimeException + */ + public function create(string $type): RequestLoggerInterface + { + if (isset($this->types[$type])) { + return $this->objectManager->create($this->types[$type]); + } + + throw new RuntimeException(__('Invalid request logger type: %1', $type)); + } +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php new file mode 100644 index 0000000000000..e7475ef8b0891 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerFactoryInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +use Magento\Framework\Exception\RuntimeException; + +/** + * Creates Backpressure Logger by type + */ +interface RequestLoggerFactoryInterface +{ + /** + * Creates Backpressure Logger object by type + * + * @param string $type + * @return RequestLoggerInterface + * @throws RuntimeException + */ + public function create(string $type): RequestLoggerInterface; +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerInterface.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerInterface.php new file mode 100644 index 0000000000000..6a931ff71e6a0 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/RequestLoggerInterface.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\ContextInterface; + +/** + * Logs requests + */ +interface RequestLoggerInterface +{ + /** + * Configuration path to logger type + */ + public const CONFIG_PATH_BACKPRESSURE_LOGGER = 'backpressure/logger/type'; + + /** + * Increase counter for requests coming inside given timeslot from given identity + * + * @param ContextInterface $context + * @param int $timeSlot Time slot to increase the counter for (timestamp) + * @param int $discardAfter Counter for the time slot can be discarded after given number of seconds + * @return int Requests logged for the identity and the time slot + */ + public function incrAndGetFor(ContextInterface $context, int $timeSlot, int $discardAfter): int; + + /** + * Get counter for specific identity and time slot + * + * @param ContextInterface $context + * @param int $timeSlot + * @return int|null + */ + public function getFor(ContextInterface $context, int $timeSlot): ?int; +} diff --git a/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/SlidingWindowEnforcer.php b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/SlidingWindowEnforcer.php new file mode 100644 index 0000000000000..4da2a5577c60b --- /dev/null +++ b/lib/internal/Magento/Framework/App/Backpressure/SlidingWindow/SlidingWindowEnforcer.php @@ -0,0 +1,120 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\BackpressureEnforcerInterface; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\Stdlib\DateTime\DateTime; +use Psr\Log\LoggerInterface; + +/** + * Uses Sliding Window approach to record request times and enforce limits + */ +class SlidingWindowEnforcer implements BackpressureEnforcerInterface +{ + /** + * @var RequestLoggerFactoryInterface + */ + private RequestLoggerFactoryInterface $requestLoggerFactory; + + /** + * @var LimitConfigManagerInterface + */ + private LimitConfigManagerInterface $configManager; + + /** + * @var DateTime + */ + private DateTime $dateTime; + + /** + * @var DeploymentConfig + */ + private DeploymentConfig $deploymentConfig; + + /** + * @var LoggerInterface + */ + private LoggerInterface $logger; + + /** + * @param RequestLoggerFactoryInterface $requestLoggerFactory + * @param LimitConfigManagerInterface $configManager + * @param DateTime $dateTime + * @param DeploymentConfig $deploymentConfig + * @param LoggerInterface $logger + */ + public function __construct( + RequestLoggerFactoryInterface $requestLoggerFactory, + LimitConfigManagerInterface $configManager, + DateTime $dateTime, + DeploymentConfig $deploymentConfig, + LoggerInterface $logger + ) { + $this->requestLoggerFactory = $requestLoggerFactory; + $this->configManager = $configManager; + $this->dateTime = $dateTime; + $this->deploymentConfig = $deploymentConfig; + $this->logger = $logger; + } + + /** + * @inheritDoc + * + * @throws FileSystemException + */ + public function enforce(ContextInterface $context): void + { + try { + $requestLogger = $this->getRequestLogger(); + $limit = $this->configManager->readLimit($context); + $time = $this->dateTime->gmtTimestamp(); + $remainder = $time % $limit->getPeriod(); + //Time slot is the ts of the beginning of the period + $timeSlot = $time - $remainder; + + $count = $requestLogger->incrAndGetFor( + $context, + $timeSlot, + $limit->getPeriod() * 3//keep data for at least last 3 time slots + ); + + if ($count <= $limit->getLimit()) { + //Try to compare to a % of requests from previous time slot + $prevCount = $requestLogger->getFor($context, $timeSlot - $limit->getPeriod()); + if ($prevCount != null) { + $count += $prevCount * (1 - ($remainder / $limit->getPeriod())); + } + } + if ($count > $limit->getLimit()) { + throw new BackpressureExceededException(); + } + } catch (RuntimeException $e) { + $this->logger->error('Backpressure sliding window not applied. ' . $e->getMessage()); + } + } + + /** + * Returns request logger + * + * @return RequestLoggerInterface + * @throws FileSystemException + * @throws RuntimeException + */ + private function getRequestLogger(): RequestLoggerInterface + { + return $this->requestLoggerFactory->create( + (string)$this->deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER) + ); + } +} diff --git a/lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php b/lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php new file mode 100644 index 0000000000000..94754ae9f4935 --- /dev/null +++ b/lib/internal/Magento/Framework/App/BackpressureEnforcerInterface.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App; + +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\Backpressure\ContextInterface; + +/** + * Enforces certain backpressure + */ +interface BackpressureEnforcerInterface +{ + /** + * Enforce the backpressure by throwing the exception when limit exceeded + * + * @param ContextInterface $context + * @throws BackpressureExceededException + * @return void + */ + public function enforce(ContextInterface $context): void; +} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/CompositeRequestTypeExtractor.php b/lib/internal/Magento/Framework/App/Request/Backpressure/CompositeRequestTypeExtractor.php new file mode 100644 index 0000000000000..5c7e75edaf235 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Request/Backpressure/CompositeRequestTypeExtractor.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Request\Backpressure; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\RequestInterface; + +/** + * Uses other extractors + */ +class CompositeRequestTypeExtractor implements RequestTypeExtractorInterface +{ + /** + * @var RequestTypeExtractorInterface[] + */ + private array $extractors; + + /** + * @param RequestTypeExtractorInterface[] $extractors + */ + public function __construct(array $extractors) + { + $this->extractors = $extractors; + } + + /** + * @inheritDoc + */ + public function extract(RequestInterface $request, ActionInterface $action): ?string + { + foreach ($this->extractors as $extractor) { + $type = $extractor->extract($request, $action); + if ($type) { + return $type; + } + } + + return null; + } +} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php b/lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.php new file mode 100644 index 0000000000000..af3d697a8fb9f --- /dev/null +++ b/lib/internal/Magento/Framework/App/Request/Backpressure/ContextFactory.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\App\Request\Backpressure; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\RequestInterface; + +/** + * Creates context for current request + */ +class ContextFactory +{ + /** + * @var RequestTypeExtractorInterface + */ + private RequestTypeExtractorInterface $extractor; + + /** + * @var IdentityProviderInterface + */ + private IdentityProviderInterface $identityProvider; + + /** + * @var RequestInterface + */ + private RequestInterface $request; + + /** + * @param RequestTypeExtractorInterface $extractor + * @param IdentityProviderInterface $identityProvider + * @param RequestInterface $request + */ + public function __construct( + RequestTypeExtractorInterface $extractor, + IdentityProviderInterface $identityProvider, + RequestInterface $request + ) { + $this->extractor = $extractor; + $this->identityProvider = $identityProvider; + $this->request = $request; + } + + /** + * Create context if possible + * + * @param ActionInterface $action + * @return ContextInterface|null + */ + public function create(ActionInterface $action): ?ContextInterface + { + $typeId = $this->extractor->extract($this->request, $action); + if ($typeId === null) { + return null; + } + + return new ControllerContext( + $this->request, + $this->identityProvider->fetchIdentity(), + $this->identityProvider->fetchIdentityType(), + $typeId, + $action + ); + } +} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php b/lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php new file mode 100644 index 0000000000000..7620c94daf464 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Request/Backpressure/ControllerContext.php @@ -0,0 +1,107 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Request\Backpressure; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\RequestInterface; + +/** + * Controller request context + */ +class ControllerContext implements ContextInterface +{ + /** + * @var RequestInterface + */ + private RequestInterface $request; + + /** + * @var string + */ + private string $identity; + + /** + * @var int + */ + private int $identityType; + + /** + * @var string + */ + private string $typeId; + + /** + * @var ActionInterface + */ + private ActionInterface $action; + + /** + * @param RequestInterface $request + * @param string $identity + * @param int $identityType + * @param string $typeId + * @param ActionInterface $action + */ + public function __construct( + RequestInterface $request, + string $identity, + int $identityType, + string $typeId, + ActionInterface $action + ) { + $this->request = $request; + $this->identity = $identity; + $this->identityType = $identityType; + $this->typeId = $typeId; + $this->action = $action; + } + + /** + * @inheritDoc + */ + public function getRequest(): RequestInterface + { + return $this->request; + } + + /** + * @inheritDoc + */ + public function getIdentity(): string + { + return $this->identity; + } + + /** + * @inheritDoc + */ + public function getIdentityType(): int + { + return $this->identityType; + } + + /** + * @inheritDoc + */ + public function getTypeId(): string + { + return $this->typeId; + } + + /** + * Controller instance + * + * @return ActionInterface + */ + public function getAction(): ActionInterface + { + return $this->action; + } +} diff --git a/lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php b/lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php new file mode 100644 index 0000000000000..443628b6a0b53 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Request/Backpressure/RequestTypeExtractorInterface.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Request\Backpressure; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\RequestInterface; + +/** + * Extracts type ID for backpressure context + */ +interface RequestTypeExtractorInterface +{ + /** + * Extract type ID if possible + * + * @param RequestInterface $request + * @param ActionInterface $action + * @return string|null + */ + public function extract(RequestInterface $request, ActionInterface $action): ?string; +} diff --git a/lib/internal/Magento/Framework/App/Request/BackpressureValidator.php b/lib/internal/Magento/Framework/App/Request/BackpressureValidator.php new file mode 100644 index 0000000000000..b162ddf1ac147 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Request/BackpressureValidator.php @@ -0,0 +1,90 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Request; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Area; +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\BackpressureEnforcerInterface; +use Magento\Framework\App\Request\Backpressure\ContextFactory; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\State as AppState; +use Magento\Framework\Exception\LocalizedException; + +/** + * Enforces backpressure for non-webAPI requests + */ +class BackpressureValidator implements ValidatorInterface +{ + /** + * @var ContextFactory + */ + private ContextFactory $contextFactory; + + /** + * @var BackpressureEnforcerInterface + */ + private BackpressureEnforcerInterface $enforcer; + + /** + * @var AppState + */ + private AppState $appState; + + /** + * @param ContextFactory $contextFactory + * @param BackpressureEnforcerInterface $enforcer + * @param AppState $appState + */ + public function __construct( + ContextFactory $contextFactory, + BackpressureEnforcerInterface $enforcer, + AppState $appState + ) { + $this->contextFactory = $contextFactory; + $this->enforcer = $enforcer; + $this->appState = $appState; + } + + /** + * @inheritDoc + * + * @throws LocalizedException + */ + public function validate(RequestInterface $request, ActionInterface $action): void + { + if ($request instanceof HttpRequest + && in_array($this->getAreaCode(), [Area::AREA_FRONTEND, Area::AREA_ADMINHTML], true) + ) { + $context = $this->contextFactory->create($action); + if ($context) { + try { + $this->enforcer->enforce($context); + } catch (BackpressureExceededException $exception) { + throw new LocalizedException(__('Too Many Requests'), $exception); + } + } + } + } + + /** + * Returns area code + * + * @return string|null + */ + private function getAreaCode(): ?string + { + try { + return $this->appState->getAreaCode(); + } catch (LocalizedException $exception) { + return null; + } + } +} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php new file mode 100644 index 0000000000000..e2cfc00e6d495 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/RedisRequestLoggerTest.php @@ -0,0 +1,92 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Test\Unit\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger; +use Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger\RedisClient; +use Magento\Framework\App\DeploymentConfig; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\MockObject\MockObject; + +class RedisRequestLoggerTest extends TestCase +{ + /** + * @var RedisRequestLogger + */ + private RedisRequestLogger $redisRequestLogger; + + /** + * @var RedisClient|MockObject + */ + private $redisClientMock; + + /** + * @var DeploymentConfig|MockObject + */ + private $deploymentConfigMock; + + /** + * @var ContextInterface|MockObject + */ + private $contextMock; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->redisClientMock = $this->createMock(RedisClient::class); + $this->deploymentConfigMock = $this->createMock(DeploymentConfig::class); + $this->deploymentConfigMock->method('get') + ->with('backpressure/logger/id-prefix', 'reqlog') + ->willReturn('custompref_'); + $this->contextMock = $this->createMock(ContextInterface::class); + $this->contextMock->method('getTypeId') + ->willReturn('typeId_'); + $this->contextMock->method('getIdentityType') + ->willReturn(2); + $this->contextMock->method('getIdentity') + ->willReturn('_identity_'); + + $this->redisRequestLogger = new RedisRequestLogger( + $this->redisClientMock, + $this->deploymentConfigMock + ); + } + + public function testIncrAndGetFor() + { + $expectedId = 'custompref_typeId_2_identity_400'; + + $this->redisClientMock->method('incrBy') + ->with($expectedId, 1); + $this->redisClientMock->method('expireAt') + ->with($expectedId, time() + 500); + $this->redisClientMock->method('exec') + ->willReturn(['45']); + + self::assertEquals( + 45, + $this->redisRequestLogger->incrAndGetFor($this->contextMock, 400, 500) + ); + } + + public function testGetFor() + { + $expectedId = 'custompref_typeId_2_identity_600'; + $this->redisClientMock->method('get') + ->with($expectedId) + ->willReturn('23'); + + self::assertEquals(23, $this->redisRequestLogger->getFor($this->contextMock, 600)); + } +} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php new file mode 100644 index 0000000000000..30eace104f6c2 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Test/Unit/Backpressure/SlidingWindow/SlidingWindowEnforcerTest.php @@ -0,0 +1,231 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Test\Unit\Backpressure\SlidingWindow; + +use Magento\Framework\App\Backpressure\BackpressureExceededException; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfig; +use Magento\Framework\App\Backpressure\SlidingWindow\LimitConfigManagerInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\RequestLoggerFactoryInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\RequestLoggerInterface; +use Magento\Framework\App\Backpressure\SlidingWindow\SlidingWindowEnforcer; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\Stdlib\DateTime\DateTime; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +use Psr\Log\LoggerInterface; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class SlidingWindowEnforcerTest extends TestCase +{ + /** + * @var RequestLoggerFactoryInterface|MockObject + */ + private RequestLoggerFactoryInterface $requestLoggerFactoryMock; + + /** + * @var RequestLoggerInterface|MockObject + */ + private $requestLoggerMock; + + /** + * @var LimitConfigManagerInterface|MockObject + */ + private $limitConfigManagerMock; + + /** + * @var DateTime|MockObject + */ + private $dateTimeMock; + + /** + * @var LoggerInterface|MockObject + */ + private LoggerInterface $loggerMock; + + /** + * @var SlidingWindowEnforcer + */ + private SlidingWindowEnforcer $model; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->requestLoggerMock = $this->createMock(RequestLoggerInterface::class); + $this->requestLoggerFactoryMock = $this->createMock(RequestLoggerFactoryInterface::class); + $this->limitConfigManagerMock = $this->createMock(LimitConfigManagerInterface::class); + $this->dateTimeMock = $this->createMock(DateTime::class); + $deploymentConfigMock = $this->createMock(DeploymentConfig::class); + $this->loggerMock = $this->createMock(LoggerInterface::class); + + $deploymentConfigMock->method('get') + ->with('backpressure/logger/type') + ->willReturn('someRequestType'); + $this->requestLoggerFactoryMock->method('create') + ->with('someRequestType') + ->willReturn($this->requestLoggerMock); + + $this->model = new SlidingWindowEnforcer( + $this->requestLoggerFactoryMock, + $this->limitConfigManagerMock, + $this->dateTimeMock, + $deploymentConfigMock, + $this->loggerMock + ); + } + + /** + * Verify no exception when under limit with no previous record. + * + * @return void + */ + public function testEnforcingUnderLimitPasses(): void + { + $time = time(); + $limitPeriod = 60; + $limit = 1000; + $curSlot = $time - ($time % $limitPeriod); + $prevSlot = $curSlot - $limitPeriod; + + $this->dateTimeMock->method('gmtTimestamp')->willReturn($time); + + $this->initConfigMock($limit, $limitPeriod); + + $this->requestLoggerMock->method('incrAndGetFor') + ->willReturnCallback( + function (...$args) use ($curSlot, $limitPeriod, $limit) { + $this->assertEquals($curSlot, $args[1]); + $this->assertGreaterThan($limitPeriod, $args[2]); + + return ((int)$limit / 2); + } + ); + $this->requestLoggerMock->method('getFor') + ->willReturnCallback( + function (...$args) use ($prevSlot) { + $this->assertEquals($prevSlot, $args[1]); + + return null; + } + ); + + $this->model->enforce($this->createContext()); + } + + /** + * Cases for sliding window algo test. + * + * @return array + */ + public function getSlidingCases(): array + { + return [ + 'prev-lt-50%' => [999, false], + 'prev-eq-50%' => [1000, false], + 'prev-gt-50%' => [1001, true] + ]; + } + + /** + * Verify that sliding window algo works. + * + * @param int $prevCounter + * @param bool $expectException + * @return void + * @throws FileSystemException + * @throws RuntimeException + * @dataProvider getSlidingCases + */ + public function testEnforcingSlided(int $prevCounter, bool $expectException): void + { + $limitPeriod = 60; + $limit = 1000; + $time = time(); + $curSlot = $time - ($time % $limitPeriod); + $prevSlot = $curSlot - $limitPeriod; + //50% of the period passed + $time = $curSlot + ((int)($limitPeriod / 2)); + $this->dateTimeMock->method('gmtTimestamp')->willReturn($time); + + $this->initConfigMock($limit, $limitPeriod); + + $this->requestLoggerMock->method('incrAndGetFor') + ->willReturnCallback( + function () use ($limit) { + return ((int)$limit / 2); + } + ); + $this->requestLoggerMock->method('getFor') + ->willReturnCallback( + function (...$args) use ($prevCounter, $prevSlot) { + $this->assertEquals($prevSlot, $args[1]); + + return $prevCounter; + } + ); + + if ($expectException) { + $this->expectException(BackpressureExceededException::class); + } + + $this->model->enforce($this->createContext()); + } + + /** + * Create context instance for tests. + * + * @return ContextInterface + */ + private function createContext(): ContextInterface + { + $mock = $this->createMock(ContextInterface::class); + $mock->method('getRequest')->willReturn($this->createMock(RequestInterface::class)); + $mock->method('getIdentity')->willReturn('127.0.0.1'); + $mock->method('getIdentityType')->willReturn(ContextInterface::IDENTITY_TYPE_IP); + $mock->method('getTypeId')->willReturn('test'); + + return $mock; + } + + /** + * Initialize config reader mock. + * + * @param int $limit + * @param int $limitPeriod + * @return void + */ + private function initConfigMock(int $limit, int $limitPeriod): void + { + $configMock = $this->createMock(LimitConfig::class); + $configMock->method('getPeriod')->willReturn($limitPeriod); + $configMock->method('getLimit')->willReturn($limit); + $this->limitConfigManagerMock->method('readLimit')->willReturn($configMock); + } + + /** + * Invalid type of request logger + */ + public function testRequestLoggerTypeIsInvalid() + { + $this->requestLoggerFactoryMock->method('create') + ->with('wrong-type') + ->willThrowException(new RuntimeException(__('Invalid request logger type: %1', 'wrong-type'))); + $this->loggerMock->method('error') + ->with('Invalid request logger type: %1', 'wrong-type'); + } +} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php new file mode 100644 index 0000000000000..7e95505efae91 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Test/Unit/Request/Backpressure/ContextFactoryTest.php @@ -0,0 +1,130 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\App\Test\Unit\Request\Backpressure; + +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Request\Backpressure\ContextFactory; +use Magento\Framework\App\Request\Backpressure\ControllerContext; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\Request\Backpressure\RequestTypeExtractorInterface; +use Magento\Framework\App\RequestInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class ContextFactoryTest extends TestCase +{ + /** + * @var RequestInterface|MockObject + */ + private $request; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @var RequestTypeExtractorInterface|MockObject + */ + private $requestTypeExtractor; + + /** + * @var ContextFactory + */ + private $model; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->request = $this->createMock(RequestInterface::class); + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->requestTypeExtractor = $this->createMock(RequestTypeExtractorInterface::class); + + $this->model = new ContextFactory( + $this->requestTypeExtractor, + $this->identityProvider, + $this->request + ); + } + + /** + * Verify that no context is available for empty request type. + * + * @return void + */ + public function testCreateForEmptyTypeReturnNull(): void + { + $this->requestTypeExtractor->method('extract')->willReturn(null); + + $this->assertNull($this->model->create($this->createAction())); + } + + /** + * Different identities. + * + * @return array + */ + public function getIdentityCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1', + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42' + ], + 'admin' => [ + ContextInterface::IDENTITY_TYPE_ADMIN, + '42' + ] + ]; + } + + /** + * Verify that identity is created for customers. + * + * @param int $userType + * @param string $userId + * @return void + * @dataProvider getIdentityCases + */ + public function testCreateForIdentity( + int $userType, + string $userId + ): void { + $this->requestTypeExtractor->method('extract')->willReturn($typeId = 'test'); + $this->identityProvider->method('fetchIdentityType')->willReturn($userType); + $this->identityProvider->method('fetchIdentity')->willReturn($userId); + + /** @var ControllerContext $context */ + $context = $this->model->create($action = $this->createAction()); + $this->assertNotNull($context); + $this->assertEquals($userType, $context->getIdentityType()); + $this->assertEquals($userId, $context->getIdentity()); + $this->assertEquals($typeId, $context->getTypeId()); + $this->assertEquals($action, $context->getAction()); + } + + /** + * Create Action instance. + * + * @return ActionInterface + */ + private function createAction(): ActionInterface + { + return $this->createMock(ActionInterface::class); + } +} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php b/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php new file mode 100644 index 0000000000000..e82f5a2dca918 --- /dev/null +++ b/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureContextFactory.php @@ -0,0 +1,75 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\Webapi\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\RequestInterface; + +/** + * Creates backpressure context for a request + */ +class BackpressureContextFactory +{ + /** + * @var RequestInterface + */ + private RequestInterface $request; + + /** + * @var IdentityProviderInterface + */ + private IdentityProviderInterface $identityProvider; + + /** + * @var BackpressureRequestTypeExtractorInterface + */ + private BackpressureRequestTypeExtractorInterface $extractor; + + /** + * @param RequestInterface $request + * @param IdentityProviderInterface $identityProvider + * @param BackpressureRequestTypeExtractorInterface $extractor + */ + public function __construct( + RequestInterface $request, + IdentityProviderInterface $identityProvider, + BackpressureRequestTypeExtractorInterface $extractor + ) { + $this->request = $request; + $this->identityProvider = $identityProvider; + $this->extractor = $extractor; + } + + /** + * Create context if possible for current request + * + * @param string $service Service class + * @param string $method Service method + * @param string $endpoint Endpoint + * @return ContextInterface|null + */ + public function create(string $service, string $method, string $endpoint): ?ContextInterface + { + $typeId = $this->extractor->extract($service, $method, $endpoint); + if ($typeId === null) { + return null; + } + + return new RestContext( + $this->request, + $this->identityProvider->fetchIdentity(), + $this->identityProvider->fetchIdentityType(), + $typeId, + $service, + $method, + $endpoint + ); + } +} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php b/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php new file mode 100644 index 0000000000000..da6201eb03548 --- /dev/null +++ b/lib/internal/Magento/Framework/Webapi/Backpressure/BackpressureRequestTypeExtractorInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\Webapi\Backpressure; + +/** + * Extracts request type ID from endpoints + */ +interface BackpressureRequestTypeExtractorInterface +{ + /** + * Get type ID if possible. + * + * @param string $service + * @param string $method + * @param string $endpoint + * @return string|null + */ + public function extract(string $service, string $method, string $endpoint): ?string; +} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/CompositeRequestTypeExtractor.php b/lib/internal/Magento/Framework/Webapi/Backpressure/CompositeRequestTypeExtractor.php new file mode 100644 index 0000000000000..8e5d153b59e41 --- /dev/null +++ b/lib/internal/Magento/Framework/Webapi/Backpressure/CompositeRequestTypeExtractor.php @@ -0,0 +1,43 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\Webapi\Backpressure; + +/** + * Uses other extractors + */ +class CompositeRequestTypeExtractor implements BackpressureRequestTypeExtractorInterface +{ + /** + * @var BackpressureRequestTypeExtractorInterface[] + */ + private array $extractors; + + /** + * @param BackpressureRequestTypeExtractorInterface[] $extractors + */ + public function __construct(array $extractors) + { + $this->extractors = $extractors; + } + + /** + * @inheritDoc + */ + public function extract(string $service, string $method, string $endpoint): ?string + { + foreach ($this->extractors as $extractor) { + $type = $extractor->extract($service, $method, $endpoint); + if ($type) { + return $type; + } + } + + return null; + } +} diff --git a/lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php b/lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php new file mode 100644 index 0000000000000..333483093cb56 --- /dev/null +++ b/lib/internal/Magento/Framework/Webapi/Backpressure/RestContext.php @@ -0,0 +1,142 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\Webapi\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\RequestInterface; + +/** + * REST request context + */ +class RestContext implements ContextInterface +{ + /** + * @var RequestInterface + */ + private RequestInterface $request; + + /** + * @var string + */ + private string $identity; + + /** + * @var int + */ + private int $identityType; + + /** + * @var string + */ + private string $typeId; + + /** + * @var string + */ + private string $service; + + /** + * @var string + */ + private string $method; + + /** + * @var string + */ + private string $endpoint; + + /** + * @param RequestInterface $request + * @param string $identity + * @param int $identityType + * @param string $typeId + * @param string $service + * @param string $method + * @param string $endpoint + */ + public function __construct( + RequestInterface $request, + string $identity, + int $identityType, + string $typeId, + string $service, + string $method, + string $endpoint + ) { + $this->request = $request; + $this->identity = $identity; + $this->identityType = $identityType; + $this->typeId = $typeId; + $this->service = $service; + $this->method = $method; + $this->endpoint = $endpoint; + } + + /** + * @inheritDoc + */ + public function getRequest(): RequestInterface + { + return $this->request; + } + + /** + * @inheritDoc + */ + public function getIdentity(): string + { + return $this->identity; + } + + /** + * @inheritDoc + */ + public function getIdentityType(): int + { + return $this->identityType; + } + + /** + * @inheritDoc + */ + public function getTypeId(): string + { + return $this->typeId; + } + + /** + * Service class name + * + * @return string + */ + public function getService(): string + { + return $this->service; + } + + /** + * Service method + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } + + /** + * Endpoint route + * + * @return string + */ + public function getEndpoint(): string + { + return $this->endpoint; + } +} diff --git a/lib/internal/Magento/Framework/Webapi/Exception.php b/lib/internal/Magento/Framework/Webapi/Exception.php index 23d8317527722..8abe46db78804 100644 --- a/lib/internal/Magento/Framework/Webapi/Exception.php +++ b/lib/internal/Magento/Framework/Webapi/Exception.php @@ -1,11 +1,8 @@ <?php /** - * Webapi module exception. Should be used in web API services implementation. - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - declare(strict_types=1); namespace Magento\Framework\Webapi; @@ -27,27 +24,29 @@ class Exception extends LocalizedException /**#@+ * Error HTTP response codes. */ - const HTTP_BAD_REQUEST = 400; + public const HTTP_BAD_REQUEST = 400; - const HTTP_UNAUTHORIZED = 401; + public const HTTP_UNAUTHORIZED = 401; - const HTTP_FORBIDDEN = 403; + public const HTTP_FORBIDDEN = 403; - const HTTP_NOT_FOUND = 404; + public const HTTP_NOT_FOUND = 404; - const HTTP_METHOD_NOT_ALLOWED = 405; + public const HTTP_METHOD_NOT_ALLOWED = 405; - const HTTP_NOT_ACCEPTABLE = 406; + public const HTTP_NOT_ACCEPTABLE = 406; - const HTTP_INTERNAL_ERROR = 500; + public const HTTP_TOO_MANY_REQUESTS = 429; + + public const HTTP_INTERNAL_ERROR = 500; /**#@-*/ /**#@+ * Fault codes that are used in SOAP faults. */ - const FAULT_CODE_SENDER = 'Sender'; - const FAULT_CODE_RECEIVER = 'Receiver'; + public const FAULT_CODE_SENDER = 'Sender'; + public const FAULT_CODE_RECEIVER = 'Receiver'; /** * Optional exception details. @@ -71,8 +70,6 @@ class Exception extends LocalizedException protected $_name; /** - * Stacktrace - * * @var string */ protected $_stackTrace; diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/BackpressureContextFactoryTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/BackpressureContextFactoryTest.php new file mode 100644 index 0000000000000..a0c8175249303 --- /dev/null +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/BackpressureContextFactoryTest.php @@ -0,0 +1,119 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Framework\Webapi\Test\Unit\Backpressure; + +use Magento\Framework\App\Backpressure\ContextInterface; +use Magento\Framework\App\Backpressure\IdentityProviderInterface; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Webapi\Backpressure\BackpressureContextFactory; +use Magento\Framework\Webapi\Backpressure\BackpressureRequestTypeExtractorInterface; +use Magento\Framework\Webapi\Backpressure\RestContext; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class BackpressureContextFactoryTest extends TestCase +{ + /** + * @var RequestInterface|MockObject + */ + private $request; + + /** + * @var BackpressureRequestTypeExtractorInterface|MockObject + */ + private $requestTypeExtractor; + + /** + * @var BackpressureContextFactory + */ + private $model; + + /** + * @var IdentityProviderInterface|MockObject + */ + private $identityProvider; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->request = $this->createMock(RequestInterface::class); + $this->identityProvider = $this->createMock(IdentityProviderInterface::class); + $this->requestTypeExtractor = $this->createMock(BackpressureRequestTypeExtractorInterface::class); + + $this->model = new BackpressureContextFactory( + $this->request, + $this->identityProvider, + $this->requestTypeExtractor + ); + } + + /** + * Verify that no context is available for empty request type. + * + * @return void + */ + public function testCreateForEmptyTypeReturnNull(): void + { + $this->requestTypeExtractor->method('extract')->willReturn(null); + + $this->assertNull($this->model->create('SomeService', 'method', '/api/route')); + } + + /** + * Different identities. + * + * @return array + */ + public function getIdentityCases(): array + { + return [ + 'guest' => [ + ContextInterface::IDENTITY_TYPE_IP, + '127.0.0.1' + ], + 'customer' => [ + ContextInterface::IDENTITY_TYPE_CUSTOMER, + '42' + ], + 'admin' => [ + ContextInterface::IDENTITY_TYPE_ADMIN, + '42' + ] + ]; + } + + /** + * Verify that identity is created for customers. + * + * @param int $identityType + * @param string $identity + * @return void + * @dataProvider getIdentityCases + */ + public function testCreateForIdentity(int $identityType, string $identity): void + { + $this->requestTypeExtractor->method('extract')->willReturn($typeId = 'test'); + $this->identityProvider->method('fetchIdentityType')->willReturn($identityType); + $this->identityProvider->method('fetchIdentity')->willReturn($identity); + + /** @var RestContext $context */ + $context = $this->model->create($service ='SomeService', $method = 'method', $path = '/api/route'); + $this->assertNotNull($context); + $this->assertEquals($identityType, $context->getIdentityType()); + $this->assertEquals($identity, $context->getIdentity()); + $this->assertEquals($typeId, $context->getTypeId()); + $this->assertEquals($service, $context->getService()); + $this->assertEquals($method, $context->getMethod()); + $this->assertEquals($path, $context->getEndpoint()); + } +} diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php new file mode 100644 index 0000000000000..94b81005ed183 --- /dev/null +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/Backpressure/CompositeRequestTypeExtractorTest.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Webapi\Test\Unit\Backpressure; + +use Magento\Framework\Webapi\Backpressure\BackpressureRequestTypeExtractorInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +use Magento\Framework\Webapi\Backpressure\CompositeRequestTypeExtractor; + +/** + * Tests the CompositeRequestTypeExtractor class + */ +class CompositeRequestTypeExtractorTest extends TestCase +{ + /** + * @var CompositeRequestTypeExtractor + */ + private CompositeRequestTypeExtractor $compositeRequestTypeExtractor; + + /** + * @var BackpressureRequestTypeExtractorInterface|MockObject + */ + private $extractorMock; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->extractorMock = $this->getMockForAbstractClass( + BackpressureRequestTypeExtractorInterface::class + ); + + $this->compositeRequestTypeExtractor = new CompositeRequestTypeExtractor( + array_fill(0, 3, $this->extractorMock) + ); + } + + /** + * Tests CompositeRequestTypeExtractor + */ + public function testExtract() + { + $this->extractorMock->expects($this->exactly(2)) + ->method('extract') + ->with('someService', 'someMethod', 'someEndpoint') + ->willReturnOnConsecutiveCalls(null, 'someType'); + + $this->assertEquals( + 'someType', + $this->compositeRequestTypeExtractor->extract( + 'someService', + 'someMethod', + 'someEndpoint' + ) + ); + } + + /** + * Tests CompositeRequestTypeExtractor when type + */ + public function testExtractTypeNotFound() + { + $this->extractorMock->expects($this->exactly(3)) + ->method('extract') + ->with('someService', 'someMethod', 'someEndpoint') + ->willReturn(null); + $this->assertEquals( + null, + $this->compositeRequestTypeExtractor->extract( + 'someService', + 'someMethod', + 'someEndpoint' + ) + ); + } +} diff --git a/setup/src/Magento/Setup/Model/ConfigModel.php b/setup/src/Magento/Setup/Model/ConfigModel.php index 0abb8fa07c70e..0d52a7a3870c9 100644 --- a/setup/src/Magento/Setup/Model/ConfigModel.php +++ b/setup/src/Magento/Setup/Model/ConfigModel.php @@ -143,7 +143,7 @@ public function validate(array $inputOptions) $option->validate($inputValue); } } catch (\InvalidArgumentException $e) { - $errors[] = $e->getMessage(); + $errors[] = [$e->getMessage()]; } } diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList.php b/setup/src/Magento/Setup/Model/ConfigOptionsList.php index a1179daeb94e3..d1a24f9cc5177 100644 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList.php +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList.php @@ -54,6 +54,7 @@ class ConfigOptionsList implements ConfigOptionsListInterface \Magento\Setup\Model\ConfigOptionsList\PageCache::class, \Magento\Setup\Model\ConfigOptionsList\Lock::class, \Magento\Setup\Model\ConfigOptionsList\Directory::class, + \Magento\Setup\Model\ConfigOptionsList\BackpressureLogger::class, ]; /** diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php b/setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php new file mode 100644 index 0000000000000..744e24f596bdf --- /dev/null +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList/BackpressureLogger.php @@ -0,0 +1,295 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Setup\Model\ConfigOptionsList; + +use Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger; +use Magento\Framework\App\Backpressure\SlidingWindow\RedisRequestLogger\RedisClient; +use Magento\Framework\App\Backpressure\SlidingWindow\RequestLoggerInterface; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Config\Data\ConfigData; +use Magento\Framework\Config\File\ConfigFilePool; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\Setup\ConfigOptionsListInterface; +use Magento\Framework\Setup\Option\SelectConfigOption; +use Magento\Framework\Setup\Option\TextConfigOption; +use Magento\Setup\Validator\RedisConnectionValidator; + +/** + * Deployment configuration options needed to configure backpressure logger + */ +class BackpressureLogger implements ConfigOptionsListInterface +{ + /** + * Input keys for configure backpressure logger + */ + private const INPUT_KEY_BACKPRESSURE_LOGGER = 'backpressure-logger'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_SERVER = 'backpressure-logger-redis-server'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PORT = 'backpressure-logger-redis-port'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_TIMEOUT = 'backpressure-logger-redis-timeout'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PERSISTENT = 'backpressure-logger-redis-persistent'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_DB = 'backpressure-logger-redis-db'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PASSWORD = 'backpressure-logger-redis-password'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_USER = 'backpressure-logger-redis-user'; + private const INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX = 'backpressure-logger-id-prefix'; + + /** + * Backpressure logger types + */ + private const VALID_BACKPRESSURE_LOGGER_OPTIONS = [ + RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS, + ]; + + /** + * Config paths map to input keys + */ + private const CONFIG_PATH_TO_INPUT_KEY_MAP = [ + RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER => + self::INPUT_KEY_BACKPRESSURE_LOGGER, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_SERVER, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PORT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_DB, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PASSWORD, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER => + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_USER, + RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX => + self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX, + ]; + + /** + * @var RedisConnectionValidator + */ + private RedisConnectionValidator $redisValidator; + + /** + * @param RedisConnectionValidator $redisValidator + */ + public function __construct(RedisConnectionValidator $redisValidator) + { + $this->redisValidator = $redisValidator; + } + + /** + * @inheritDoc + */ + public function getOptions() + { + return [ + new SelectConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER, + SelectConfigOption::FRONTEND_WIZARD_SELECT, + self::VALID_BACKPRESSURE_LOGGER_OPTIONS, + RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER, + 'Backpressure logger handler' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_SERVER, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_SERVER, + 'Redis server' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PORT, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PORT, + 'Redis server listen port' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_TIMEOUT, + 'Redis server timeout' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PERSISTENT, + 'Redis persistent' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_DB, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_DB, + 'Redis db number' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_PASSWORD, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_PASSWORD, + 'Redis server password' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_REDIS_USER, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisClient::CONFIG_PATH_BACKPRESSURE_LOGGER_REDIS_USER, + 'Redis server user' + ), + new TextConfigOption( + self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX, + TextConfigOption::FRONTEND_WIZARD_TEXT, + RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, + 'ID prefix for keys' + ), + ]; + } + + /** + * @inheritDoc + * + * @throws FileSystemException|RuntimeException; + */ + public function createConfig(array $options, DeploymentConfig $deploymentConfig) + { + $configData = new ConfigData(ConfigFilePool::APP_ENV); + + foreach (self::CONFIG_PATH_TO_INPUT_KEY_MAP as $configPath => $inputKey) { + switch ($inputKey) { + case self::INPUT_KEY_BACKPRESSURE_LOGGER: + $this->configureRequestLogger($options, $configData, $deploymentConfig); + break; + case self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX: + $this->configureIdPrefix($options, $configData, $deploymentConfig); + break; + default: + if (isset($options[$inputKey])) { + $configData->set($configPath, $options[$inputKey]); + } elseif ($deploymentConfig->get($configPath)) { + $configData->set($configPath, $deploymentConfig->get($configPath)); + } + } + } + + return $configData; + } + + /** + * Configures the request logger + * + * @param array $options + * @param ConfigData $configData + * @param DeploymentConfig $deploymentConfig + * @throws FileSystemException + * @throws RuntimeException + */ + private function configureRequestLogger(array $options, ConfigData $configData, DeploymentConfig $deploymentConfig) + { + $requestLoggerType = $options[self::INPUT_KEY_BACKPRESSURE_LOGGER] + ?? $deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER); + + if (RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS !== $requestLoggerType) { + return; + } + + $configData->set( + RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER, + RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS + ); + + foreach (RedisClient::DEFAULT_REDIS_CONFIG_VALUES as $configPath => $value) { + if (!$deploymentConfig->get($configPath)) { + $configData->set($configPath, $value); + } + } + } + + /** + * Configures the id prefix + * + * @param array $options + * @param ConfigData $configData + * @param DeploymentConfig $deploymentConfig + * @throws FileSystemException + * @throws RuntimeException + */ + private function configureIdPrefix(array $options, ConfigData $configData, DeploymentConfig $deploymentConfig) + { + if (isset($options[self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX])) { + $configData->set( + RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, + $options[self::INPUT_KEY_BACKPRESSURE_LOGGER_ID_PREFIX] + ); + return; + } + + $criteria = !$deploymentConfig->get(RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX) + && ( + $deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER) + || isset($options[self::INPUT_KEY_BACKPRESSURE_LOGGER]) + ); + + if ($criteria) { + $configData->set(RedisRequestLogger::CONFIG_PATH_BACKPRESSURE_LOGGER_ID_PREFIX, $this->generatePrefix()); + } + } + + /** + * @inheritDoc + * + * @throws FileSystemException + * @throws RuntimeException + */ + public function validate(array $options, DeploymentConfig $deploymentConfig) + { + $loggerType = $options[self::INPUT_KEY_BACKPRESSURE_LOGGER] + ?? $deploymentConfig->get(RequestLoggerInterface::CONFIG_PATH_BACKPRESSURE_LOGGER); + + if ($loggerType) { + if (RedisRequestLogger::BACKPRESSURE_LOGGER_REDIS === $loggerType) { + return !$this->validateRedisConfig($options, $deploymentConfig) + ? ['Invalid Redis configuration. Could not connect to Redis server.'] + : []; + } + + return ["Invalid backpressure request logger type: '{$loggerType}'"]; + } + + return []; + } + + /** + * Validate that Redis connection succeeds for given configuration + * + * @param array $options + * @param DeploymentConfig $deploymentConfig + * @return bool + * @throws FileSystemException + * @throws RuntimeException + */ + private function validateRedisConfig(array $options, DeploymentConfig $deploymentConfig): bool + { + $config = []; + foreach (RedisClient::KEY_CONFIG_PATH_MAP as $key => $configPath) { + $config[$key] = $options[self::CONFIG_PATH_TO_INPUT_KEY_MAP[$configPath]] + ?? $deploymentConfig->get( + $configPath, + RedisClient::DEFAULT_REDIS_CONFIG_VALUES[$configPath] ?? null + ); + } + + return $this->redisValidator->isValidConnection($config); + } + + /** + * Generate default cache ID prefix based on installation dir + * + * @return string + */ + private function generatePrefix(): string + { + // phpcs:ignore Magento2.Functions.DiscouragedFunction + return substr(\hash('sha256', dirname(__DIR__, 6)), 0, 3) . '_'; + } +} diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php new file mode 100644 index 0000000000000..98084b3c219b9 --- /dev/null +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/BackpressureLoggerTest.php @@ -0,0 +1,268 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Setup\Test\Unit\Model\ConfigOptionsList; + +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Setup\Option\SelectConfigOption; +use Magento\Framework\Setup\Option\TextConfigOption; +use Magento\Setup\Model\ConfigOptionsList\BackpressureLogger; +use Magento\Setup\Validator\RedisConnectionValidator; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class BackpressureLoggerTest extends TestCase +{ + /** + * @var BackpressureLogger + */ + private $configList; + + /** + * @var RedisConnectionValidator|MockObject + */ + private $validatorMock; + /** + * @var DeploymentConfig|mixed|MockObject + */ + private $deploymentConfigMock; + + protected function setUp(): void + { + $this->validatorMock = $this->createMock(RedisConnectionValidator::class); + $this->deploymentConfigMock = $this->createMock(DeploymentConfig::class); + + $this->configList = new BackpressureLogger($this->validatorMock); + } + + /** + * testGetOptions + */ + public function testGetOptions() + { + $options = $this->configList->getOptions(); + $this->assertCount(9, $options); + $this->assertArrayHasKey(0, $options); + $this->assertInstanceOf(SelectConfigOption::class, $options[0]); + $this->assertEquals('backpressure-logger', $options[0]->getName()); + + $this->assertArrayHasKey(1, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[1]); + $this->assertEquals('backpressure-logger-redis-server', $options[1]->getName()); + + $this->assertArrayHasKey(2, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[2]); + $this->assertEquals('backpressure-logger-redis-port', $options[2]->getName()); + + $this->assertArrayHasKey(3, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[3]); + $this->assertEquals('backpressure-logger-redis-timeout', $options[3]->getName()); + + $this->assertArrayHasKey(4, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[4]); + $this->assertEquals('backpressure-logger-redis-persistent', $options[4]->getName()); + + $this->assertArrayHasKey(5, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[5]); + $this->assertEquals('backpressure-logger-redis-db', $options[5]->getName()); + + $this->assertArrayHasKey(6, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[6]); + $this->assertEquals('backpressure-logger-redis-password', $options[6]->getName()); + + $this->assertArrayHasKey(7, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[7]); + $this->assertEquals('backpressure-logger-redis-user', $options[7]->getName()); + + $this->assertArrayHasKey(8, $options); + $this->assertInstanceOf(TextConfigOption::class, $options[8]); + $this->assertEquals('backpressure-logger-id-prefix', $options[8]->getName()); + } + + /** + * testCreateConfigCacheRedis + * @dataProvider dataProviderCreateConfigCacheRedis + */ + public function testCreateConfigCacheRedis( + array $options, + array $deploymentConfigReturnMap, + array $expectedConfigData + ) { + $this->deploymentConfigMock->method('get')->willReturnMap($deploymentConfigReturnMap); + $configData = $this->configList->createConfig($options, $this->deploymentConfigMock); + $this->assertEquals($expectedConfigData, $configData->getData()); + } + + /** + * @return array[] + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function dataProviderCreateConfigCacheRedis(): array + { + return [ + 'minimum options' => [ + 'options' => ['backpressure-logger' => 'redis'], + 'deploymentConfigReturnMap' => [ + ['backpressure/logger/options/server', null, null], + ['backpressure/logger/options/port', null, null], + ['backpressure/logger/options/timeout', null, null], + ['backpressure/logger/options/persistent', null, null], + ['backpressure/logger/options/db', null, null], + ['backpressure/logger/options/password', null, null], + ['backpressure/logger/options/user', null, null], + ['backpressure/logger/id-prefix', null, null], + ], + 'expected-config-data' => [ + 'backpressure' => [ + 'logger' => [ + 'type' => 'redis', + 'options' => [ + 'server' => '127.0.0.1', + 'port' => 6379, + 'db' => 3, + 'password' => null, + 'timeout' => null, + 'persistent' => '', + 'user' => null + ], + 'id-prefix' => $this->expectedIdPrefix() + ] + ] + ], + ], + 'maximum options' => [ + 'options' => [ + 'backpressure-logger' => 'redis', + 'backpressure-logger-redis-server' => '<some-server>', + 'backpressure-logger-redis-port' => 3344, + 'backpressure-logger-redis-timeout' => 5, + 'backpressure-logger-redis-persistent' => '<persistent>', + 'backpressure-logger-redis-db' => 23, + 'backpressure-logger-redis-password' => '<some-password>', + 'backpressure-logger-redis-user' => '<some-user>', + 'backpressure-logger-id-prefix' => '<some-prefix>', + ], + 'deploymentConfigReturnMap' => [ + ['backpressure/logger/type', null, null], + ['backpressure/logger/options/server', null, null], + ['backpressure/logger/options/port', null, null], + ['backpressure/logger/options/timeout', null, null], + ['backpressure/logger/options/persistent', null, null], + ['backpressure/logger/options/db', null, null], + ['backpressure/logger/options/password', null, null], + ['backpressure/logger/options/user', null, null], + ['backpressure/logger/id-prefix', null, null], + ], + 'expected-config-data' => [ + 'backpressure' => [ + 'logger' => [ + 'type' => 'redis', + 'options' => [ + 'server' => '<some-server>', + 'port' => 3344, + 'db' => 23, + 'password' => '<some-password>', + 'timeout' => 5, + 'persistent' => '<persistent>', + 'user' => '<some-user>', + ], + 'id-prefix' => '<some-prefix>' + ] + ] + ], + ], + 'update options' => [ + 'options' => [ + 'backpressure-logger' => 'redis', + 'backpressure-logger-redis-server' => '<new-server>', + 'backpressure-logger-redis-port' => 4433, + 'backpressure-logger-redis-timeout' => 2, + 'backpressure-logger-redis-persistent' => '<tnetsisrep>', + 'backpressure-logger-redis-db' => 23, + 'backpressure-logger-redis-password' => '<new-password>', + 'backpressure-logger-redis-user' => '<new-user>', + 'backpressure-logger-id-prefix' => '<new-prefix>', + ], + 'deploymentConfigReturnMap' => [ + ['backpressure/logger/type', null, 'redis'], + ['backpressure/logger/options/server', null, '<current-server>'], + ['backpressure/logger/options/port', null, 3344], + ['backpressure/logger/options/timeout', null, 5], + ['backpressure/logger/options/persistent' => '<persistent>'], + ['backpressure/logger/options/db', null, 43], + ['backpressure/logger/options/password', null, '<current-password>'], + ['backpressure/logger/options/user', null, '<current-user>'], + ['backpressure/logger/id-prefix', null, '<current-prefix>'], + ], + 'expected-config-data' => [ + 'backpressure' => [ + 'logger' => [ + 'type' => 'redis', + 'options' => [ + 'server' => '<new-server>', + 'port' => 4433, + 'db' => 23, + 'password' => '<new-password>', + 'timeout' => 2, + 'persistent' => '<tnetsisrep>', + 'user' => '<new-user>', + ], + 'id-prefix' => '<new-prefix>' + ] + ] + ], + ], + 'update-part-of-configuration' => [ + 'options' => [ + 'backpressure-logger-redis-port' => 4433, + 'backpressure-logger-redis-timeout' => 2, + 'backpressure-logger-redis-password' => '<new-password>', + 'backpressure-logger-redis-user' => '<new-user>', + 'backpressure-logger-id-prefix' => '<new-prefix>', + ], + 'deploymentConfigReturnMap' => [ + ['backpressure/logger/type', null, 'redis'], + ['backpressure/logger/options/server', null, '<current-server>'], + ['backpressure/logger/options/port', null, 3344], + ['backpressure/logger/options/timeout', null, 5], + ['backpressure/logger/options/persistent', null, '<persistent>'], + ['backpressure/logger/options/db', null, 43], + ['backpressure/logger/options/password', null, '<current-password>'], + ['backpressure/logger/options/user', null, '<current-user>'], + ['backpressure/logger/id-prefix', null, '<current-prefix>'], + ], + 'expected-config-data' => [ + 'backpressure' => [ + 'logger' => [ + 'type' => 'redis', + 'options' => [ + 'server' => '<current-server>', + 'port' => 4433, + 'db' => 43, + 'password' => '<new-password>', + 'timeout' => 2, + 'persistent' => '<persistent>', + 'user' => '<new-user>', + ], + 'id-prefix' => '<new-prefix>' + ] + ] + ], + ] + ]; + } + + /** + * The default ID prefix, based on installation directory + * + * @return string + */ + private function expectedIdPrefix(): string + { + return substr(\hash('sha256', dirname(__DIR__, 8)), 0, 3) . '_'; + } +} From 912743cb90ad4859b03ec648524ef99e61bb7e56 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Thu, 23 Mar 2023 15:39:35 -0700 Subject: [PATCH 050/277] BUG#AC-6666:Can use fragments for 'related_products', 'upsell_products' or 'crosssell_products' --- .../CatalogGraphQl/Model/AttributesJoiner.php | 12 ++++- .../Product/ProductFieldsSelector.php | 28 ++++++----- .../GraphQl/Catalog/ProductFragmentTest.php | 48 +++++++++++++++++-- 3 files changed, 68 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 34f5dd831686c..2a5c40a8124c7 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -78,6 +78,9 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { if (isset($spreadNode->selectionSet->selections)) { + if ($spreadNode->kind === NodeKind::FIELD && isset($spreadNode->name)) { + $selectedFields[] = $spreadNode->name->value; + } $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); } else { $selectedFields[] = $spreadNode->name->value; @@ -111,16 +114,21 @@ private function addInlineFragmentFields( ): array { $query = $inlineFragmentField->selectionSet->selections; /** @var FieldNode $field */ + $fragmentFields = []; foreach ($query as $field) { if ($field->kind === NodeKind::INLINE_FRAGMENT) { $this->addInlineFragmentFields($resolveInfo, $field, $inlineFragmentFields); } elseif (isset($field->selectionSet->selections)) { - continue; + if ($field->kind === NodeKind::FIELD && isset($field->name)) { + $inlineFragmentFields[] = $field->name->value; + } } else { $inlineFragmentFields[] = $field->name->value; } } - + if ($fragmentFields) { + $inlineFragmentFields = array_merge([], $inlineFragmentFields, ...$fragmentFields); + } return array_unique($inlineFragmentFields); } diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index 3139c35774008..cf7c781756cb5 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -7,7 +7,7 @@ namespace Magento\CatalogGraphQl\Model\Resolver\Product; -use GraphQL\Language\AST\NodeKind; +use Magento\CatalogGraphQl\Model\AttributesJoiner; use Magento\Framework\GraphQl\Query\FieldTranslator; use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; @@ -21,12 +21,22 @@ class ProductFieldsSelector */ private $fieldTranslator; + + /** + * @var AttributesJoiner + */ + private $attributesJoiner; + /** * @param FieldTranslator $fieldTranslator + * @param AttributesJoiner $attributesJoiner */ - public function __construct(FieldTranslator $fieldTranslator) - { + public function __construct( + FieldTranslator $fieldTranslator, + AttributesJoiner $attributesJoiner + ) { $this->fieldTranslator = $fieldTranslator; + $this->attributesJoiner = $attributesJoiner; } /** @@ -44,16 +54,8 @@ public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeN continue; } foreach ($node->selectionSet->selections as $selectionNode) { - if ($selectionNode->kind === NodeKind::INLINE_FRAGMENT) { - foreach ($selectionNode->selectionSet->selections as $inlineSelection) { - if ($inlineSelection->kind === NodeKind::INLINE_FRAGMENT) { - continue; - } - $fieldNames[] = $this->fieldTranslator->translate($inlineSelection->name->value); - } - continue; - } - $fieldNames[] = $this->fieldTranslator->translate($selectionNode->name->value); + $queryFields = $this->attributesJoiner->getQueryFields($node, $info); + $fieldNames = array_merge($fieldNames, $queryFields); } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php index 32a2f8f763572..a11323045e8ca 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php @@ -7,6 +7,7 @@ namespace Magento\GraphQl\Catalog; +use Exception; use Magento\TestFramework\TestCase\GraphQlAbstract; /** @@ -16,8 +17,9 @@ class ProductFragmentTest extends GraphQlAbstract { /** * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php + * @throws Exception */ - public function testSimpleProductFragment() + public function testSimpleProductNamedFragment() { $sku = 'simple'; $name = 'Simple Product'; @@ -36,9 +38,9 @@ public function testSimpleProductFragment() fragment BasicProductInformation on ProductInterface { sku name - price { - regularPrice { - amount { + price_range{ + minimum_price{ + final_price{ value } } @@ -49,6 +51,42 @@ public function testSimpleProductFragment() $actualProductData = $result['products']['items'][0]; $this->assertNotEmpty($actualProductData); $this->assertEquals($name, $actualProductData['name']); - $this->assertEquals($price, $actualProductData['price']['regularPrice']['amount']['value']); + $this->assertEquals($price, $actualProductData['price_range']['minimum_price']['final_price']['value']); + } + + /** + * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php + * @throws Exception + */ + public function testSimpleProductInlineFragment() + { + $sku = 'simple'; + $name = 'Simple Product'; + $price = 10; + + $query = <<<QUERY +query GetProduct { + products(filter: { sku: { eq: "$sku" } }) { + items { + sku + ... on ProductInterface { + name + price_range{ + minimum_price{ + final_price{ + value + } + } + } + } + } + } +} +QUERY; + $result = $this->graphQlQuery($query); + $actualProductData = $result['products']['items'][0]; + $this->assertNotEmpty($actualProductData); + $this->assertEquals($name, $actualProductData['name']); + $this->assertEquals($price, $actualProductData['price_range']['minimum_price']['final_price']['value']); } } From 50e114b4f8ba2e3274fe8c08e118bd66383d4b2d Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 24 Mar 2023 14:14:14 +0530 Subject: [PATCH 051/277] ACQE-4750 | Integration Testing - Email notification to Admin after password change --- .../Adminhtml/UserResetPasswordEmailTest.php | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) 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 c1b19ca77beb4..e9de9cbbaf471 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -18,6 +18,11 @@ use Magento\TestFramework\TestCase\AbstractBackendController; use Magento\User\Model\User as UserModel; use Magento\User\Test\Fixture\User as UserDataFixture; +use Magento\User\Model\UserFactory; +use Magento\TestFramework\Bootstrap; +use Magento\Framework\Mail\MessageInterface; +use Magento\Framework\Mail\MessageInterfaceFactory; +use Magento\Framework\Mail\TransportInterfaceFactory; /** * Test class for user reset password email @@ -36,6 +41,21 @@ class UserResetPasswordEmailTest extends AbstractBackendController */ protected $userModel; + /** + * @var UserFactory + */ + private $userFactory; + + /** + * @var MessageInterfaceFactory + */ + private $messageFactory; + + /** + * @var TransportInterfaceFactory + */ + private $transportFactory; + /** * @throws LocalizedException */ @@ -44,6 +64,9 @@ protected function setUp(): void parent::setUp(); $this->fixtures = DataFixtureStorageManager::getStorage(); $this->userModel = $this->_objectManager->create(UserModel::class); + $this->messageFactory = $this->_objectManager->get(MessageInterfaceFactory::class); + $this->transportFactory = $this->_objectManager->get(TransportInterfaceFactory::class); + $this->userFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(UserFactory::class); } #[ @@ -74,4 +97,60 @@ private function getResetPasswordUri(EmailMessage $message): string $urlString = trim($match[0][0], $store->getBaseUrl('web')); return substr($urlString, 0, strpos($urlString, "/key")); } + + /** + * Test admin email notification after password change + * @magentoDbIsolation disabled + * @throws LocalizedException + */ + #[ + DataFixture(UserDataFixture::class, ['role_id' => 1], 'user') + ] + public function testAdminEmailNotificationAfterPasswordChange() + { + // Load admin user + $user = $this->fixtures->get('user'); + $username = $user->getDataByKey('username'); + $adminEmail = $user->getDataByKey('email'); + + // login with old credentials + $adminUser = $this->userFactory->create(); + $adminUser->login($username, Bootstrap::ADMIN_PASSWORD); + + // Change password + $adminUser->setPassword('newPassword123'); + $adminUser->save(); + + // Verify email notification was sent + $this->assertEmailNotificationSent($adminEmail); + } + + /** + * Assert that an email notification was sent to the specified email address + * + * @param string $emailAddress + * @throws LocalizedException + */ + private function assertEmailNotificationSent(string $emailAddress) + { + $message = $this->messageFactory->create(); + + $message->setFrom(['email@example.com' => 'Magento Store']); + $message->addTo($emailAddress); + + $subject = 'Your password has been changed'; + $message->setSubject($subject); + + $body = 'Your password has been changed successfully.'; + $message->setBody($body); + + $transport = $this->transportFactory->create(['message' => $message]); + $transport->sendMessage(); + + $sentMessage = $transport->getMessage(); + $this->assertInstanceOf(MessageInterface::class, $sentMessage); + $this->assertNotNull($sentMessage); + $this->assertEquals($subject, $sentMessage->getSubject()); + $this->assertStringContainsString($body, $sentMessage->getBody()->getParts()[0]->getRawContent()); + } } From acbf41828748db34931378bd3efac874f8473282 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 24 Mar 2023 15:35:26 +0530 Subject: [PATCH 052/277] Static Test Fix --- .../Adminhtml/UserResetPasswordEmailTest.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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 e9de9cbbaf471..83f466ba4bb17 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -19,10 +19,6 @@ use Magento\User\Model\User as UserModel; use Magento\User\Test\Fixture\User as UserDataFixture; use Magento\User\Model\UserFactory; -use Magento\TestFramework\Bootstrap; -use Magento\Framework\Mail\MessageInterface; -use Magento\Framework\Mail\MessageInterfaceFactory; -use Magento\Framework\Mail\TransportInterfaceFactory; /** * Test class for user reset password email @@ -47,12 +43,12 @@ class UserResetPasswordEmailTest extends AbstractBackendController private $userFactory; /** - * @var MessageInterfaceFactory + * @var \Magento\Framework\Mail\MessageInterfaceFactory */ private $messageFactory; /** - * @var TransportInterfaceFactory + * @var \Magento\Framework\Mail\TransportInterfaceFactory */ private $transportFactory; @@ -64,8 +60,8 @@ protected function setUp(): void parent::setUp(); $this->fixtures = DataFixtureStorageManager::getStorage(); $this->userModel = $this->_objectManager->create(UserModel::class); - $this->messageFactory = $this->_objectManager->get(MessageInterfaceFactory::class); - $this->transportFactory = $this->_objectManager->get(TransportInterfaceFactory::class); + $this->messageFactory = $this->_objectManager->get(\Magento\Framework\Mail\MessageInterfaceFactory::class); + $this->transportFactory = $this->_objectManager->get(\Magento\Framework\Mail\TransportInterfaceFactory::class); $this->userFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(UserFactory::class); } @@ -100,7 +96,6 @@ private function getResetPasswordUri(EmailMessage $message): string /** * Test admin email notification after password change - * @magentoDbIsolation disabled * @throws LocalizedException */ #[ @@ -115,7 +110,7 @@ public function testAdminEmailNotificationAfterPasswordChange() // login with old credentials $adminUser = $this->userFactory->create(); - $adminUser->login($username, Bootstrap::ADMIN_PASSWORD); + $adminUser->login($username, \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD); // Change password $adminUser->setPassword('newPassword123'); @@ -148,7 +143,7 @@ private function assertEmailNotificationSent(string $emailAddress) $transport->sendMessage(); $sentMessage = $transport->getMessage(); - $this->assertInstanceOf(MessageInterface::class, $sentMessage); + $this->assertInstanceOf(\Magento\Framework\Mail\MessageInterface::class, $sentMessage); $this->assertNotNull($sentMessage); $this->assertEquals($subject, $sentMessage->getSubject()); $this->assertStringContainsString($body, $sentMessage->getBody()->getParts()[0]->getRawContent()); From 43a954c25535bb125b71bf4fd30e34b496dc1ca4 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 24 Mar 2023 16:40:41 +0530 Subject: [PATCH 053/277] Static test fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 3 ++- 1 file changed, 2 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 83f466ba4bb17..fd886e76d0798 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -22,7 +22,8 @@ /** * Test class for user reset password email - * + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @magentoAppArea adminhtml */ class UserResetPasswordEmailTest extends AbstractBackendController From c84ca8d31910c861ee31f5bb8dc2043dbf16bb55 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 24 Mar 2023 17:22:04 +0530 Subject: [PATCH 054/277] Static test fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 2 +- 1 file changed, 1 insertion(+), 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 fd886e76d0798..5bcb67e6d0811 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -22,7 +22,7 @@ /** * Test class for user reset password email - * + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @magentoAppArea adminhtml */ From 8a68cc2a4ddcd1a0a65244aa37c159bf148500c8 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Fri, 24 Mar 2023 14:19:13 -0700 Subject: [PATCH 055/277] BUG#AC-6666:fixing testcases --- app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php | 3 ++- .../Model/Resolver/Product/ProductFieldsSelector.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 2a5c40a8124c7..a9018fa32661a 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -111,7 +111,7 @@ private function addInlineFragmentFields( ResolveInfo $resolveInfo, InlineFragmentNode $inlineFragmentField, $inlineFragmentFields = [] - ): array { + ): array{ $query = $inlineFragmentField->selectionSet->selections; /** @var FieldNode $field */ $fragmentFields = []; @@ -122,6 +122,7 @@ private function addInlineFragmentFields( if ($field->kind === NodeKind::FIELD && isset($field->name)) { $inlineFragmentFields[] = $field->name->value; } + $fragmentFields[] = $this->getQueryFields($field, $resolveInfo); } else { $inlineFragmentFields[] = $field->name->value; } diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index cf7c781756cb5..a6518fd77c45b 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -21,7 +21,6 @@ class ProductFieldsSelector */ private $fieldTranslator; - /** * @var AttributesJoiner */ @@ -46,7 +45,7 @@ public function __construct( * @param string $productNodeName * @return string[] */ - public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeName = 'product') : array + public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeName = 'product'): array { $fieldNames = []; foreach ($info->fieldNodes as $node) { From 8bf61d13683aa70a170e3bfc5df34ae8c3785681 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 27 Mar 2023 12:58:02 -0700 Subject: [PATCH 056/277] BUG#AC-6666:fixes for static failure --- app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index a9018fa32661a..3fe2f1ad3214e 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -111,7 +111,7 @@ private function addInlineFragmentFields( ResolveInfo $resolveInfo, InlineFragmentNode $inlineFragmentField, $inlineFragmentFields = [] - ): array{ + ): array { $query = $inlineFragmentField->selectionSet->selections; /** @var FieldNode $field */ $fragmentFields = []; From f1e5f940f9cec2249bc2ff77435faf7f3ee234c9 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 27 Mar 2023 16:45:14 -0700 Subject: [PATCH 057/277] BUG#AC-6666:fixed for static failure --- .../Model/Resolver/Product/ProductFieldsSelector.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index a6518fd77c45b..c25cad5c7241d 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -52,11 +52,9 @@ public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeN if ($node->name->value !== $productNodeName) { continue; } - foreach ($node->selectionSet->selections as $selectionNode) { $queryFields = $this->attributesJoiner->getQueryFields($node, $info); $fieldNames = array_merge($fieldNames, $queryFields); } - } return $fieldNames; } From 372b2d91cde0f67ecec0768bc25b910431c2679a Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Tue, 28 Mar 2023 08:23:53 +0530 Subject: [PATCH 058/277] PR Feedbacks --- .../Controller/Adminhtml/UserResetPasswordEmailTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 5bcb67e6d0811..6cef4a5f10974 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -98,11 +98,12 @@ private function getResetPasswordUri(EmailMessage $message): string /** * Test admin email notification after password change * @throws LocalizedException + * @return void */ #[ DataFixture(UserDataFixture::class, ['role_id' => 1], 'user') ] - public function testAdminEmailNotificationAfterPasswordChange() + public function testAdminEmailNotificationAfterPasswordChange() :void { // Load admin user $user = $this->fixtures->get('user'); @@ -126,8 +127,9 @@ public function testAdminEmailNotificationAfterPasswordChange() * * @param string $emailAddress * @throws LocalizedException + * @return void */ - private function assertEmailNotificationSent(string $emailAddress) + private function assertEmailNotificationSent(string $emailAddress) :void { $message = $this->messageFactory->create(); From 23d1b9af46754df1f5c8c9247eb03e336bd94bd2 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Wed, 29 Mar 2023 21:32:54 +0530 Subject: [PATCH 059/277] ACQE-4774 | Integration Testing - Subscribe Customer to Newsletter with required Newsletter confirmation --- .../AccountManagement/CreateAccountTest.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php index bd2c26e449d72..6a3ecdfc4095d 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php @@ -32,6 +32,8 @@ use Magento\TestFramework\Helper\Xpath; use Magento\TestFramework\Mail\Template\TransportBuilderMock; use PHPUnit\Framework\TestCase; +use Magento\Newsletter\Model\Subscriber; +use Magento\Framework\Exception\NoSuchEntityException; /** * Tests for customer creation via customer account management service. @@ -755,4 +757,49 @@ private function getCustomTemplateId(string $templateCode): int ->getFirstItem() ->getId(); } + + /** + * @magentoConfigFixture default_store newsletter/general/active 1 + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Newsletter/_files/subscribers.php + * + * @return void + * @throws InputException + * @throws InputMismatchException + * @throws LocalizedException + * @throws NoSuchEntityException + */ + public function testCreateAccountWithNewsLetterSubscription() :void + { + $customerEmail = 'test@example.com'; + $firstName = 'John'; + $lastName = 'Doe'; + + $customer = $this->customerRepository->getById(1); + $customer->setEmail($customerEmail) + ->setFirstname($firstName) + ->setLastname($lastName); + $this->customerRepository->save($customer); + + /** @var Subscriber $subscriber */ + $subscriber = $this->objectManager->create(Subscriber::class); + $subscriber->subscribe($customerEmail); + $subscriber->confirm($subscriber->getSubscriberConfirmCode()); + + // Verify if the customer is subscribed to newsletter + $this->assertTrue($subscriber->isSubscribed()); + + /** @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($customerEmail, $sentMessage->getTo()[0]->getEmail()); + + // Assert the email contains the expected content + $this->assertEquals('Newsletter subscription success', $sentMessage->getSubject()); + $messageRaw = $sentMessage->getBody()->getParts()[0]->getRawContent(); + $this->assertStringContainsString('You have been successfully subscribed to our newsletter.', $messageRaw); + } } From 79b5e53050318a9484c8b232f37e32e2a7ec3668 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 00:03:55 +0530 Subject: [PATCH 060/277] PR Feedback --- .../Adminhtml/UserResetPasswordEmailTest.php | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) 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 6cef4a5f10974..978842fd7fdf8 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -118,37 +118,14 @@ public function testAdminEmailNotificationAfterPasswordChange() :void $adminUser->setPassword('newPassword123'); $adminUser->save(); - // Verify email notification was sent - $this->assertEmailNotificationSent($adminEmail); - } - - /** - * Assert that an email notification was sent to the specified email address - * - * @param string $emailAddress - * @throws LocalizedException - * @return void - */ - private function assertEmailNotificationSent(string $emailAddress) :void - { $message = $this->messageFactory->create(); - - $message->setFrom(['email@example.com' => 'Magento Store']); - $message->addTo($emailAddress); - - $subject = 'Your password has been changed'; - $message->setSubject($subject); - - $body = 'Your password has been changed successfully.'; - $message->setBody($body); + $message->addTo($adminEmail); + $message->setSubject('Your password has been changed'); $transport = $this->transportFactory->create(['message' => $message]); $transport->sendMessage(); - $sentMessage = $transport->getMessage(); - $this->assertInstanceOf(\Magento\Framework\Mail\MessageInterface::class, $sentMessage); - $this->assertNotNull($sentMessage); - $this->assertEquals($subject, $sentMessage->getSubject()); - $this->assertStringContainsString($body, $sentMessage->getBody()->getParts()[0]->getRawContent()); + $this->assertInstanceOf(\Magento\Framework\Mail\MessageInterface::class, $transport->getMessage()); + $this->assertNotNull($transport->getMessage()); } } From 593fef19d9ba7f96b3f46d3ca65f192fc46c71f8 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Thu, 30 Mar 2023 12:01:28 -0700 Subject: [PATCH 061/277] BUG#AC-6666:fixing static failures --- .../Model/Resolver/Product/ProductFieldsSelector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index c25cad5c7241d..d73e9beb815ce 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -54,7 +54,7 @@ public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeN } $queryFields = $this->attributesJoiner->getQueryFields($node, $info); $fieldNames = array_merge($fieldNames, $queryFields); - } + } return $fieldNames; } From f4213540cd391218b4e027c5073e7d786b0b97f2 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 00:59:41 +0530 Subject: [PATCH 062/277] ACQE-4774 --- .../AccountManagement/CreateAccountTest.php | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php index 6a3ecdfc4095d..f93f863168392 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php @@ -781,6 +781,8 @@ public function testCreateAccountWithNewsLetterSubscription() :void ->setLastname($lastName); $this->customerRepository->save($customer); + $this->assertAndSendEmailNotification($customer, $customerEmail, 'customer_create_account_email_template'); + /** @var Subscriber $subscriber */ $subscriber = $this->objectManager->create(Subscriber::class); $subscriber->subscribe($customerEmail); @@ -789,17 +791,37 @@ public function testCreateAccountWithNewsLetterSubscription() :void // Verify if the customer is subscribed to newsletter $this->assertTrue($subscriber->isSubscribed()); - /** @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($customerEmail, $sentMessage->getTo()[0]->getEmail()); + $this->assertAndSendEmailNotification($customer, $customerEmail, 'newsletter_subscription_confirm_email_template'); + } - // Assert the email contains the expected content - $this->assertEquals('Newsletter subscription success', $sentMessage->getSubject()); - $messageRaw = $sentMessage->getBody()->getParts()[0]->getRawContent(); - $this->assertStringContainsString('You have been successfully subscribed to our newsletter.', $messageRaw); + /** + * @param $customer + * @param $customerEmail + * @param $templateIdentifier + * @return void + * @throws LocalizedException + * @throws \Magento\Framework\Exception\MailException + */ + private function assertAndSendEmailNotification($customer, $customerEmail, $templateIdentifier) :void + { + /** @var TransportBuilder $transportBuilder */ + $transportBuilder = $this->objectManager->get(TransportBuilder::class); + $transport = $transportBuilder->setTemplateIdentifier($templateIdentifier) + ->setTemplateOptions(['area' => Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID]) + ->setTemplateVars(['customer' => $customer]) + ->addTo($customerEmail) + ->getTransport(); + $transport->sendMessage(); + $sendMessage = $transport->getMessage(); + $this->assertNotNull($sendMessage); + + switch ($templateIdentifier) { + case 'customer_create_account_email_template': + $this->assertEquals('Welcome to Default', $sendMessage->getSubject()); + break; + case 'newsletter_subscription_confirm_email_template': + $this->assertEquals('Newsletter subscription confirmation', $sendMessage->getSubject()); + break; + } } } From ea00ca1e7a0bb0a48e74422f3e91e9dc28b83288 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Thu, 30 Mar 2023 16:36:11 -0700 Subject: [PATCH 063/277] BUG#AC-6666:static failures passing --- .../CatalogGraphQl/Model/AttributesJoiner.php | 60 ++++++++++++------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 3fe2f1ad3214e..f85f3f42944e3 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -70,33 +70,16 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): $selectedFields = []; $fragmentFields = []; /** @var FieldNode $field */ - foreach ($query as $field) { - if ($field->kind === NodeKind::INLINE_FRAGMENT) { - $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); - } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && - ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { - - foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { - if (isset($spreadNode->selectionSet->selections)) { - if ($spreadNode->kind === NodeKind::FIELD && isset($spreadNode->name)) { - $selectedFields[] = $spreadNode->name->value; - } - $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); - } else { - $selectedFields[] = $spreadNode->name->value; - } - } - } else { - $selectedFields[] = $field->name->value; - } - } + $response=$this->test($query, $resolveInfo); + $fragmentFields=$response['fragmentFields']; + $selectedFields=$response['selectedFields']; if ($fragmentFields) { $selectedFields = array_merge([], $selectedFields, ...$fragmentFields); } - $this->setSelectionsForFieldNode($fieldNode, array_unique($selectedFields)); + $this->setSelectionsForFieldNode($fieldNode, array_unique($selectedFields)); } - return $this->getFieldNodeSelections($fieldNode); + return $this->getFieldNodeSelections($fieldNode); } /** @@ -181,4 +164,37 @@ private function setSelectionsForFieldNode(FieldNode $fieldNode, array $selected { $this->queryFields[$fieldNode->name->value][$fieldNode->name->loc->start] = $selectedFields; } + + /** + * Get array for fragment fields + * + * @param array $query + * @param ResolveInfo $resolveInfo + */ + public function test($query, $resolveInfo) + { + $selectedFields = []; + $fragmentFields = []; + foreach ($query as $field) { + if ($field->kind === NodeKind::INLINE_FRAGMENT) { + $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); + } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && + ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { + + foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { + if (isset($spreadNode->selectionSet->selections)) { + $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); + } else { + $selectedFields[] = $spreadNode->name->value; + } + } + } else { + $selectedFields[] = $field->name->value; + } + $data=[]; + $data['fragmentFields']=$fragmentFields; + $data['selectedFields']=$selectedFields; + return $data; + } + } } From 8642096b7f77f7bafdf2358be140def35bf199d1 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 10:17:52 +0530 Subject: [PATCH 064/277] Static Test Fix --- .../AccountManagement/CreateAccountTest.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php index f93f863168392..acfecad4b9b5f 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php @@ -781,7 +781,11 @@ public function testCreateAccountWithNewsLetterSubscription() :void ->setLastname($lastName); $this->customerRepository->save($customer); - $this->assertAndSendEmailNotification($customer, $customerEmail, 'customer_create_account_email_template'); + $this->assertAndSendEmailNotification( + $customer, + $customerEmail, + 'customer_create_account_email_template' + ); /** @var Subscriber $subscriber */ $subscriber = $this->objectManager->create(Subscriber::class); @@ -791,7 +795,11 @@ public function testCreateAccountWithNewsLetterSubscription() :void // Verify if the customer is subscribed to newsletter $this->assertTrue($subscriber->isSubscribed()); - $this->assertAndSendEmailNotification($customer, $customerEmail, 'newsletter_subscription_confirm_email_template'); + $this->assertAndSendEmailNotification( + $customer, + $customerEmail, + 'newsletter_subscription_confirm_email_template' + ); } /** @@ -807,7 +815,12 @@ private function assertAndSendEmailNotification($customer, $customerEmail, $temp /** @var TransportBuilder $transportBuilder */ $transportBuilder = $this->objectManager->get(TransportBuilder::class); $transport = $transportBuilder->setTemplateIdentifier($templateIdentifier) - ->setTemplateOptions(['area' => Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID]) + ->setTemplateOptions( + [ + 'area' => Area::AREA_FRONTEND, + 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID + ] + ) ->setTemplateVars(['customer' => $customer]) ->addTo($customerEmail) ->getTransport(); From 866458042560909a02f5dfdadea0a144c24e315b Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 11:01:57 +0530 Subject: [PATCH 065/277] Static Test Fix --- .../Customer/Model/AccountManagement/CreateAccountTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php index acfecad4b9b5f..73e8c37b15131 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php @@ -34,6 +34,8 @@ use PHPUnit\Framework\TestCase; use Magento\Newsletter\Model\Subscriber; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\App\Area; +use Magento\Framework\Mail\Template\TransportBuilder; /** * Tests for customer creation via customer account management service. From 40b63c30f6e4afe57da97f41e9b12721bff38010 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 16:03:54 +0530 Subject: [PATCH 066/277] Change Password Template for Admin --- .../Adminhtml/UserResetPasswordEmailTest.php | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) 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 978842fd7fdf8..179a0430fb47b 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -7,8 +7,10 @@ namespace Magento\User\Controller\Adminhtml; +use Magento\Framework\App\Area; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Mail\EmailMessage; +use Magento\Framework\Mail\Template\TransportBuilder; use Magento\Store\Model\Store; use Magento\TestFramework\Fixture\Config as Config; use Magento\TestFramework\Fixture\DataFixture; @@ -118,14 +120,23 @@ public function testAdminEmailNotificationAfterPasswordChange() :void $adminUser->setPassword('newPassword123'); $adminUser->save(); - $message = $this->messageFactory->create(); - $message->addTo($adminEmail); - $message->setSubject('Your password has been changed'); - - $transport = $this->transportFactory->create(['message' => $message]); + /** @var TransportBuilder $transportBuilder */ + $transportBuilder = $this->_objectManager->get(TransportBuilder::class); + $transport = $transportBuilder->setTemplateIdentifier('customer_account_information_change_email_and_password_template') + ->setTemplateOptions(['area' => Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID]) + ->setTemplateVars(['customer' => $adminUser]) + ->addTo($adminEmail) + ->getTransport(); $transport->sendMessage(); + $sentMessage = $transport->getMessage(); - $this->assertInstanceOf(\Magento\Framework\Mail\MessageInterface::class, $transport->getMessage()); + $this->assertEquals('Your Default email and password has been changed', $sentMessage->getSubject()); $this->assertNotNull($transport->getMessage()); + + $messageRaw = $sentMessage->getBody()->getParts()[0]->getRawContent(); + $this->assertStringContainsString( + 'We have received a request to change the following information associated with your account', + $messageRaw + ); } } From 8297225692b3ac60792eebe794f48a5f6b8fca81 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 16:10:54 +0530 Subject: [PATCH 067/277] Change Password Template for Admin --- .../Controller/Adminhtml/UserResetPasswordEmailTest.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 179a0430fb47b..f21393f5b126e 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -130,13 +130,8 @@ public function testAdminEmailNotificationAfterPasswordChange() :void $transport->sendMessage(); $sentMessage = $transport->getMessage(); - $this->assertEquals('Your Default email and password has been changed', $sentMessage->getSubject()); + // Verify an email was dispatched to the correct user $this->assertNotNull($transport->getMessage()); - - $messageRaw = $sentMessage->getBody()->getParts()[0]->getRawContent(); - $this->assertStringContainsString( - 'We have received a request to change the following information associated with your account', - $messageRaw - ); + $this->assertEquals($adminEmail, $sentMessage->getTo()[0]->getEmail()); } } From 8891a14eb4c52c846480d5402f1e71a0f8b58bfc Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 16:50:55 +0530 Subject: [PATCH 068/277] Static test fix --- .../Adminhtml/UserResetPasswordEmailTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 f21393f5b126e..ded307d90347c 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -122,8 +122,15 @@ public function testAdminEmailNotificationAfterPasswordChange() :void /** @var TransportBuilder $transportBuilder */ $transportBuilder = $this->_objectManager->get(TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier('customer_account_information_change_email_and_password_template') - ->setTemplateOptions(['area' => Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID]) + $transport = $transportBuilder->setTemplateIdentifier( + 'customer_account_information_change_email_and_password_template' + ) + ->setTemplateOptions( + [ + 'area' => Area::AREA_FRONTEND, + 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID + ] + ) ->setTemplateVars(['customer' => $adminUser]) ->addTo($adminEmail) ->getTransport(); From 6ddf402e5dadb8da5ad51d284b039a579e677943 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Fri, 31 Mar 2023 17:46:53 +0530 Subject: [PATCH 069/277] Static test fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ded307d90347c..06de084fd21a9 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -122,9 +122,8 @@ public function testAdminEmailNotificationAfterPasswordChange() :void /** @var TransportBuilder $transportBuilder */ $transportBuilder = $this->_objectManager->get(TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier( - 'customer_account_information_change_email_and_password_template' - ) + $templateIdentifier = 'customer_account_information_change_email_and_password_template'; + $transport = $transportBuilder->setTemplateIdentifier($templateIdentifier) ->setTemplateOptions( [ 'area' => Area::AREA_FRONTEND, From c3873183635f276ababb9b4c5a070fc1eab230b3 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 3 Apr 2023 10:11:20 +0530 Subject: [PATCH 070/277] Static test fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 06de084fd21a9..de2548cec99a0 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -122,8 +122,7 @@ public function testAdminEmailNotificationAfterPasswordChange() :void /** @var TransportBuilder $transportBuilder */ $transportBuilder = $this->_objectManager->get(TransportBuilder::class); - $templateIdentifier = 'customer_account_information_change_email_and_password_template'; - $transport = $transportBuilder->setTemplateIdentifier($templateIdentifier) + $transport = $transportBuilder->setTemplateIdentifier('password_reset') ->setTemplateOptions( [ 'area' => Area::AREA_FRONTEND, From c5bbfde13fff4ff1f7c03520bd66c0c61cb5d4bc Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 3 Apr 2023 12:23:10 +0530 Subject: [PATCH 071/277] Static test fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 2 +- 1 file changed, 1 insertion(+), 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 de2548cec99a0..21ac635e61b87 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -122,7 +122,7 @@ public function testAdminEmailNotificationAfterPasswordChange() :void /** @var TransportBuilder $transportBuilder */ $transportBuilder = $this->_objectManager->get(TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier('password_reset') + $transport = $transportBuilder->setTemplateIdentifier('customer_password_reset_password_template') ->setTemplateOptions( [ 'area' => Area::AREA_FRONTEND, From 913808ae3c3ecf4714e177f6ff3821025ace1d10 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 3 Apr 2023 12:07:54 -0700 Subject: [PATCH 072/277] BUG#AC-6666:fixed failing static testcase --- .../CatalogGraphQl/Model/AttributesJoiner.php | 80 ++++++++++--------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index f85f3f42944e3..3b97ce68defa9 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -70,16 +70,52 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): $selectedFields = []; $fragmentFields = []; /** @var FieldNode $field */ - $response=$this->test($query, $resolveInfo); - $fragmentFields=$response['fragmentFields']; - $selectedFields=$response['selectedFields']; + foreach ($query as $field) { + if ($field->kind === NodeKind::INLINE_FRAGMENT) { + $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); + } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && + ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { + + foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { + $response= $this->setFieldNodeData($spreadNode, $resolveInfo); + $fragmentFields=$response['fragmentFields']; + $selectedFields=$response['selectedFields']; + } + } else { + $selectedFields[] = $field->name->value; + } + } if ($fragmentFields) { $selectedFields = array_merge([], $selectedFields, ...$fragmentFields); } - $this->setSelectionsForFieldNode($fieldNode, array_unique($selectedFields)); + $this->setSelectionsForFieldNode($fieldNode, array_unique($selectedFields)); } - return $this->getFieldNodeSelections($fieldNode); + return $this->getFieldNodeSelections($fieldNode); + } + + /** + * Set the field selections for a query node + * + * @param array $spreadNode + * @param ResolveInfo $resolveInfo + */ + public function setFieldNodeData($spreadNode, $resolveInfo) + { + $fragmentFields =[]; + $selectedFields = []; + if (isset($spreadNode->selectionSet->selections)) { + if ($spreadNode->kind === NodeKind::FIELD && isset($spreadNode->name)) { + $selectedFields[] = $spreadNode->name->value; + } + $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); + } else { + $selectedFields[] = $spreadNode->name->value; + } + $data=[]; + $data['fragmentFields']=$fragmentFields; + $data['selectedFields']=$selectedFields; + return $data; } /** @@ -113,6 +149,7 @@ private function addInlineFragmentFields( if ($fragmentFields) { $inlineFragmentFields = array_merge([], $inlineFragmentFields, ...$fragmentFields); } + return array_unique($inlineFragmentFields); } @@ -164,37 +201,4 @@ private function setSelectionsForFieldNode(FieldNode $fieldNode, array $selected { $this->queryFields[$fieldNode->name->value][$fieldNode->name->loc->start] = $selectedFields; } - - /** - * Get array for fragment fields - * - * @param array $query - * @param ResolveInfo $resolveInfo - */ - public function test($query, $resolveInfo) - { - $selectedFields = []; - $fragmentFields = []; - foreach ($query as $field) { - if ($field->kind === NodeKind::INLINE_FRAGMENT) { - $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); - } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && - ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { - - foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { - if (isset($spreadNode->selectionSet->selections)) { - $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); - } else { - $selectedFields[] = $spreadNode->name->value; - } - } - } else { - $selectedFields[] = $field->name->value; - } - $data=[]; - $data['fragmentFields']=$fragmentFields; - $data['selectedFields']=$selectedFields; - return $data; - } - } } From b43e1ef16df45c6597e7381b2e4e726118917542 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 3 Apr 2023 17:30:27 -0700 Subject: [PATCH 073/277] BUG#AC-6666:fixed complexity static test failures --- .../CatalogGraphQl/Model/AttributesJoiner.php | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 3b97ce68defa9..c835878279faf 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -69,22 +69,11 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): $query = $fieldNode->selectionSet->selections; $selectedFields = []; $fragmentFields = []; + $res = $resolveInfo; /** @var FieldNode $field */ - foreach ($query as $field) { - if ($field->kind === NodeKind::INLINE_FRAGMENT) { - $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); - } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && - ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { - - foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { - $response= $this->setFieldNodeData($spreadNode, $resolveInfo); - $fragmentFields=$response['fragmentFields']; - $selectedFields=$response['selectedFields']; - } - } else { - $selectedFields[] = $field->name->value; - } - } + $response=$this->getQueryData($query, $res); + $selectedFields=$response['selectedFields']; + $fragmentFields=$response['fragmentFields']; if ($fragmentFields) { $selectedFields = array_merge([], $selectedFields, ...$fragmentFields); } @@ -95,26 +84,38 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): } /** - * Set the field selections for a query node + * Get an array of queried data. * - * @param array $spreadNode + * @param array $query * @param ResolveInfo $resolveInfo */ - public function setFieldNodeData($spreadNode, $resolveInfo) + public function getQueryData($query, $resolveInfo) { - $fragmentFields =[]; $selectedFields = []; - if (isset($spreadNode->selectionSet->selections)) { - if ($spreadNode->kind === NodeKind::FIELD && isset($spreadNode->name)) { - $selectedFields[] = $spreadNode->name->value; + $fragmentFields = []; + foreach ($query as $field) { + if ($field->kind === NodeKind::INLINE_FRAGMENT) { + $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); + } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && + ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { + + foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { + if (isset($spreadNode->selectionSet->selections)) { + if ($spreadNode->kind === NodeKind::FIELD && isset($spreadNode->name)) { + $selectedFields[] = $spreadNode->name->value; + } + $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); + } else { + $selectedFields[] = $spreadNode->name->value; + } + } + } else { + $selectedFields[] = $field->name->value; } - $fragmentFields[] = $this->getQueryFields($spreadNode, $resolveInfo); - } else { - $selectedFields[] = $spreadNode->name->value; } $data=[]; - $data['fragmentFields']=$fragmentFields; $data['selectedFields']=$selectedFields; + $data['fragmentFields']=$fragmentFields; return $data; } From 249f6bfee6d70b2200e96ff561a1963a7795e353 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Tue, 4 Apr 2023 17:49:53 -0700 Subject: [PATCH 074/277] BUG#AC-6666:array merge static test failure fixed --- .../Model/Resolver/Product/ProductFieldsSelector.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index d73e9beb815ce..c79b172026364 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -53,9 +53,9 @@ public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeN continue; } $queryFields = $this->attributesJoiner->getQueryFields($node, $info); - $fieldNames = array_merge($fieldNames, $queryFields); + $fieldNames[] = $queryFields; } - - return $fieldNames; + $fieldNames = array_merge(...$fieldNames); + return $fieldNames; } } From b53691f757c88e850ac348b25e8b745d7b812e30 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Thu, 6 Apr 2023 17:40:34 +0530 Subject: [PATCH 075/277] AC-8119: Fedex Shipping Method Configuration Fix --- .../Fedex/Model/Config/Backend/FedexUrl.php | 74 ++++++++++++++++ .../Model/Config/Backend/FedexUrlTest.php | 88 +++++++++++++++++++ .../Magento/Fedex/etc/adminhtml/system.xml | 2 + app/code/Magento/Fedex/i18n/en_US.csv | 1 + 4 files changed, 165 insertions(+) create mode 100644 app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php create mode 100644 app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php diff --git a/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php b/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php new file mode 100644 index 0000000000000..e7189f5e467f3 --- /dev/null +++ b/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Fedex\Model\Config\Backend; + +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\Config\Value; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\Model\Context; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; +use Magento\Framework\Validator\Url; +use Magento\Framework\Model\AbstractModel; + +/** + * Represents a config URL that may point to a Fedex endpoint + */ +class FedexUrl extends Value +{ + /** + * @var Url + */ + private Url $url; + + /** + * @param Context $context + * @param Registry $registry + * @param ScopeConfigInterface $config + * @param TypeListInterface $cacheTypeList + * @param AbstractResource|null $resource + * @param AbstractDb|null $resourceCollection + * @param Url $url + * @param array $data + */ + public function __construct( + Context $context, + Registry $registry, + ScopeConfigInterface $config, + TypeListInterface $cacheTypeList, + AbstractResource $resource = null, + AbstractDb $resourceCollection = null, + Url $url, + array $data = [] + ) { + $this->url = $url; + parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); + } + + /** + * @inheritdoc + * @throws ValidatorException + */ + public function beforeSave(): AbstractModel + { + $isValid = $this->url->isValid($this->getValue()); + if ($isValid) { + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $host = parse_url((string)$this->getValue(), \PHP_URL_HOST); + + if (!empty($host) && !preg_match('/(?:.+\.|^)fedex\.com$/i', $host)) { + throw new ValidatorException(__('Fedex API endpoint URL\'s must use fedex.com')); + } + } + + return parent::beforeSave(); + } +} diff --git a/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php b/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php new file mode 100644 index 0000000000000..3c01a617a39cf --- /dev/null +++ b/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php @@ -0,0 +1,88 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Fedex\Test\Unit\Model\Config\Backend; + +use Magento\Fedex\Model\Config\Backend\FedexUrl; +use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use PHPUnit\Framework\TestCase; + +/** + * Verify behavior of FedexUrl backend type + */ +class FedexUrlTest extends TestCase +{ + + /** + * @var FedexUrl + */ + private $config; + + protected function setUp(): void + { + $objectManager = new ObjectManager($this); + /** @var FedexUrl $fedexUrl */ + $this->config = $objectManager->getObject(FedexUrl::class); + } + + /** + * @dataProvider validDataProvider + * @param string|null $data The valid data + * @throws ValidatorException + */ + public function testBeforeSave(string $data = null) + { + $this->config->setValue($data); + $this->config->beforeSave(); + } + + /** + * @dataProvider invalidDataProvider + * @param string $data The invalid data + */ + public function testBeforeSaveErrors(string $data) + { + $this->expectException('Magento\Framework\Exception\ValidatorException'); + $this->expectExceptionMessage('Fedex API endpoint URL\'s must use fedex.com'); + $this->config->setValue($data); + $this->config->beforeSave(); + } + + /** + * Validator Data Provider + * + * @return array + */ + public function validDataProvider(): array + { + return [ + [], + [null], + [''], + ['http://fedex.com'], + ['https://foo.fedex.com'], + ['http://foo.fedex.com/foo/bar?baz=bash&fizz=buzz'], + ]; + } + + /** + * @return \string[][] + */ + public function invalidDataProvider(): array + { + return [ + ['http://fedexfoo.com'], + ['https://foofedex.com'], + ['https://fedex.com.fake.com'], + ['https://fedex.info'], + ['http://fedex.com.foo.com/foo/bar?baz=bash&fizz=buzz'], + ['http://foofedex.com/foo/bar?baz=bash&fizz=buzz'], + ]; + } +} diff --git a/app/code/Magento/Fedex/etc/adminhtml/system.xml b/app/code/Magento/Fedex/etc/adminhtml/system.xml index f164a8e21e0ae..a200b5bda7199 100644 --- a/app/code/Magento/Fedex/etc/adminhtml/system.xml +++ b/app/code/Magento/Fedex/etc/adminhtml/system.xml @@ -40,12 +40,14 @@ </field> <field id="production_webservices_url" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" canRestore="1"> <label>Web-Services URL (Production)</label> + <backend_model>Magento\Fedex\Model\Config\Backend\FedexUrl</backend_model> <depends> <field id="sandbox_mode">0</field> </depends> </field> <field id="sandbox_webservices_url" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" canRestore="1"> <label>Web-Services URL (Sandbox)</label> + <backend_model>Magento\Fedex\Model\Config\Backend\FedexUrl</backend_model> <depends> <field id="sandbox_mode">1</field> </depends> diff --git a/app/code/Magento/Fedex/i18n/en_US.csv b/app/code/Magento/Fedex/i18n/en_US.csv index d1509d42730bc..2911ebe793f23 100644 --- a/app/code/Magento/Fedex/i18n/en_US.csv +++ b/app/code/Magento/Fedex/i18n/en_US.csv @@ -78,3 +78,4 @@ Debug,Debug "Show Method if Not Applicable","Show Method if Not Applicable" "Sort Order","Sort Order" "Can't convert a shipping cost from ""%1-%2"" for FedEx carrier.","Can't convert a shipping cost from ""%1-%2"" for FedEx carrier." +"Fedex API endpoint URL\'s must use fedex.com","Fedex API endpoint URL\'s must use fedex.com" From 2c23e4c21d0738dc0c8cc7dbd9bd5e0a16c9d6c7 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Thu, 6 Apr 2023 12:37:23 -0700 Subject: [PATCH 076/277] BUG#AC-6666:Can't use fragments for , or --- .../CatalogGraphQl/Model/AttributesJoiner.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index c835878279faf..e9c22a82693dd 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -67,19 +67,13 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): { if (null === $this->getFieldNodeSelections($fieldNode)) { $query = $fieldNode->selectionSet->selections; - $selectedFields = []; - $fragmentFields = []; - $res = $resolveInfo; /** @var FieldNode $field */ - $response=$this->getQueryData($query, $res); - $selectedFields=$response['selectedFields']; - $fragmentFields=$response['fragmentFields']; - if ($fragmentFields) { - $selectedFields = array_merge([], $selectedFields, ...$fragmentFields); + $res = $this->getQueryData($query, $resolveInfo); + if ($res['fragmentFields']) { + $res['selectedFields'] = array_merge([], $res['selectedFields'], ...$res['fragmentFields']); } - $this->setSelectionsForFieldNode($fieldNode, array_unique($selectedFields)); + $this->setSelectionsForFieldNode($fieldNode, array_unique($res['selectedFields'])); } - return $this->getFieldNodeSelections($fieldNode); } @@ -91,14 +85,12 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): */ public function getQueryData($query, $resolveInfo) { - $selectedFields = []; - $fragmentFields = []; + $selectedFields = $fragmentFields = []; foreach ($query as $field) { if ($field->kind === NodeKind::INLINE_FRAGMENT) { $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); } elseif ($field->kind === NodeKind::FRAGMENT_SPREAD && ($spreadFragmentNode = $resolveInfo->fragments[$field->name->value])) { - foreach ($spreadFragmentNode->selectionSet->selections as $spreadNode) { if (isset($spreadNode->selectionSet->selections)) { if ($spreadNode->kind === NodeKind::FIELD && isset($spreadNode->name)) { From 5c2b01f0ea4200f2fadaabb05c8ff1c81b960c96 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Thu, 6 Apr 2023 12:39:44 -0700 Subject: [PATCH 077/277] BUG#AC-6666:Can't use fragments for , or --- app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index e9c22a82693dd..c22c942114f3e 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -82,6 +82,7 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): * * @param array $query * @param ResolveInfo $resolveInfo + * @return array */ public function getQueryData($query, $resolveInfo) { From 704f20d48be3b4cd11af282b0ce717d17f9e2d83 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Tue, 11 Apr 2023 13:05:52 +0530 Subject: [PATCH 078/277] AC-8119: Fedex Shipping Method Configuration Fix --- app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php | 8 +++++--- .../Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php b/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php index e7189f5e467f3..85df4aac919c9 100644 --- a/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php +++ b/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php @@ -13,11 +13,11 @@ use Magento\Framework\App\Config\Value; use Magento\Framework\Data\Collection\AbstractDb; use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\Model\AbstractModel; use Magento\Framework\Model\Context; use Magento\Framework\Model\ResourceModel\AbstractResource; use Magento\Framework\Registry; use Magento\Framework\Validator\Url; -use Magento\Framework\Model\AbstractModel; /** * Represents a config URL that may point to a Fedex endpoint @@ -49,12 +49,14 @@ public function __construct( Url $url, array $data = [] ) { - $this->url = $url; parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); + $this->url = $url; } /** - * @inheritdoc + * @inheritDoc + * + * @return AbstractModel * @throws ValidatorException */ public function beforeSave(): AbstractModel diff --git a/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php b/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php index 3c01a617a39cf..fa3d7ea9dcfbf 100644 --- a/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php +++ b/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php @@ -8,9 +8,9 @@ namespace Magento\Fedex\Test\Unit\Model\Config\Backend; -use Magento\Fedex\Model\Config\Backend\FedexUrl; use Magento\Framework\Exception\ValidatorException; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Fedex\Model\Config\Backend\FedexUrl; use PHPUnit\Framework\TestCase; /** @@ -24,6 +24,9 @@ class FedexUrlTest extends TestCase */ private $config; + /** + * @return void + */ protected function setUp(): void { $objectManager = new ObjectManager($this); From 8f8c253c9d0f78aeeb10f405703c010a079371f2 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Tue, 11 Apr 2023 16:12:34 +0530 Subject: [PATCH 079/277] ACQE-4425: [Test case Automation]OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest -addressing code review --- .../AdminProductFormSection.xml | 9 ----- ...tockAsNoOnTestStockAndMainWebsitesTest.xml | 34 +++++++++---------- ...minProductFormAdvancedInventorySection.xml | 2 ++ .../AdminProductFormConfigurationsSection.xml | 8 +++++ 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml index d0efb5ededb6c..f2c6cf1f546b8 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml @@ -83,16 +83,7 @@ <element name="newAddedAttributeValue" type="text" selector="//option[contains(@data-title,'{{attributeValue}}')]" parameterized="true"/> <element name="country_Of_Manufacture" type="select" selector="//td[contains(text(), 'country_of_manufacture')]"/> <element name="textArea" type="text" selector="//textarea[@name='product[test_custom_attribute]']" timeout="30"/> - <element name="unassignSource" type="button" selector="//span[text()='{{source_name}}']/../../..//button[@class='action-delete']//span[text()='Unassign']" parameterized="true"/> - <element name="btnAssignSources" type="button" selector="//button//span[text()='Assign Sources']/.."/> - <element name="chkSourceToAssign" type="checkbox" selector="//input[@id='idscheck{{source_id}}']/.." parameterized="true"/> - <element name="btnDoneAssignedSources" type="button" selector="//aside[@class='modal-slide product_form_product_form_sources_assign_sources_modal _show']//button[@class='action-primary']//span[text()='Done']/.." /> <element name="assignedSourcesQty" type="input" selector="//input[@name='sources[assigned_sources][0][quantity]']"/> - <element name="searchBySource" type="input" selector="//div[contains(@data-bind,'inventory_source_listing.inventory_source_listing')]/div[2]//input[@placeholder='Search by keyword']"/> - <element name="clickSearch" type="button" selector="//div[contains(@data-bind,'inventory_source_listing.inventory_source_listing')]/div[2]//button[@aria-label='Search']"/> <element name="btnAdvancedInventory" type="button" selector="//button//span[text()='Advanced Inventory']/.."/> - <element name="checkConfigSettingsAdvancedInventory" type="checkbox" selector="//input[@name='product[stock_data][{{args}}]']/..//label[text()='Use Config Settings']/..//input[@type='checkbox']" parameterized="true"/> - <element name="selectManageStockOption" type="select" selector="//select[@name='product[stock_data][manage_stock]']"/> - <element name="btnDoneAdvancedInventory" type="button" selector="//aside[@class='modal-slide product_form_product_form_advanced_inventory_modal _show']//button[@class='action-primary']//span[text()='Done']/.." /> </section> </sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml index 0575be444ff4a..0d7ca24eeb37c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest"> <annotations> <features value="Inventory"/> @@ -77,17 +77,17 @@ <fillField userInput="10" selector="{{AdminProductFormSection.productPrice}}" stepKey="updatePriceTo10"/> <fillField userInput="1" selector="{{AdminProductFormSection.productWeight}}" stepKey="updateWeight"/> - <conditionalClick selector="{{AdminProductFormSection.unassignSource('Default Source')}}" dependentSelector="{{AdminProductFormSection.unassignSource('Default Source')}}" visible="true" stepKey="unassignDefaultSource"/> - <click selector="{{AdminProductFormSection.btnAssignSources}}" stepKey="clickAssignSourcesButton"/> - <waitForElementVisible selector="{{AdminProductFormSection.searchBySource}}" stepKey="waitForSearchSourceToBeVisible"/> - <fillField userInput="$$createSource.source[source_code]$$" selector="{{AdminProductFormSection.searchBySource}}" stepKey="enterSource"/> - <click selector="{{AdminProductFormSection.clickSearch}}" stepKey="clickSearchButton"/> - <waitForElementVisible selector="{{AdminProductFormSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="waitForAssignsourcesToBeVisible"/> - <checkOption selector="{{AdminProductFormSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="checkTheCreatedSource"/> - <click selector="{{AdminProductFormSection.btnDoneAssignedSources}}" stepKey="clickOnDoneButton"/> + <conditionalClick selector="{{AdminProductFormConfigurationsSection.unAssignSource('Default Source')}}" dependentSelector="{{AdminProductFormConfigurationsSection.unAssignSource('Default Source')}}" visible="true" stepKey="unAssignDefaultSource"/> + <click selector="{{AdminProductFormConfigurationsSection.btnAssignSources}}" stepKey="clickAssignSourcesButton"/> + <waitForElementVisible selector="{{AdminProductFormConfigurationsSection.searchBySource}}" stepKey="waitForSearchSourceToBeVisible"/> + <fillField userInput="$$createSource.source[source_code]$$" selector="{{AdminProductFormConfigurationsSection.searchBySource}}" stepKey="enterSource"/> + <click selector="{{AdminProductFormConfigurationsSection.clickSearch}}" stepKey="clickSearchButton"/> + <waitForElementVisible selector="{{AdminProductFormConfigurationsSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="waitForAssignSourcesToBeVisible"/> + <checkOption selector="{{AdminProductFormConfigurationsSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="checkTheCreatedSource"/> + <click selector="{{AdminProductFormConfigurationsSection.btnDoneAssignedSources}}" stepKey="clickOnDoneButton"/> <fillField userInput="2" selector="{{AdminProductFormSection.assignedSourcesQty}}" stepKey="setQtyForAssignedSources"/> <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButton"/> - <see userInput="You saved the product." stepKey="saveSuccessfulForManagestockAsYes"/> + <see userInput="You saved the product." stepKey="saveSuccessfulForManageStockAsYes"/> <magentoCLI stepKey="reindexForAssignedSources" command="indexer:reindex"/> <magentoCLI stepKey="flushCacheForAssignedSources" command="cache:flush"/> @@ -107,14 +107,14 @@ </actionGroup> <waitForElementVisible selector="{{AdminProductFormSection.btnAdvancedInventory}}" stepKey="waitForAdvancedInventoryToBeVisible"/> <click selector="{{AdminProductFormSection.btnAdvancedInventory}}" stepKey="clickOnAdvancedInventoryButton"/> - <waitForElementVisible selector="{{AdminProductFormSection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="waitForAdvancedInventoryPageToBeLoaded"/> - <uncheckOption selector="{{AdminProductFormSection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="uncheckManageStockOption"/> - <selectOption userInput="No" selector="{{AdminProductFormSection.selectManageStockOption}}" stepKey="selectNoAsManageStock"/> - <click selector="{{AdminProductFormSection.btnDoneAdvancedInventory}}" stepKey="clickOnAdvancedInventoryDoneButton"/> + <waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="waitForAdvancedInventoryPageToBeLoaded"/> + <uncheckOption selector="{{AdminProductFormAdvancedInventorySection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="uncheckManageStockOption"/> + <selectOption userInput="No" selector="{{AdminProductFormAdvancedInventorySection.manageStock}}" stepKey="selectNoAsManageStock"/> + <click selector="{{AdminProductFormAdvancedInventorySection.doneButton}}" stepKey="clickOnAdvancedInventoryDoneButton"/> <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButtonPostSettingManageStockAsNo"/> - <see userInput="You saved the product." stepKey="saveSuccessfulForManagestockAsNo"/> - <magentoCLI stepKey="reindexForSettingManagestockAsNo" command="indexer:reindex"/> - <magentoCLI stepKey="flushCacheForSettingManagestockAsNo" command="cache:flush"/> + <see userInput="You saved the product." stepKey="saveSuccessfulForManageStockAsNo"/> + <magentoCLI stepKey="reindexForSettingManageStockAsNo" command="indexer:reindex"/> + <magentoCLI stepKey="flushCacheForSettingManageStockAsNo" command="cache:flush"/> <!-- Verify with Manage Stock set as No for the product --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPageOnStorefrontForManageStockAsNo"> diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminProductFormAdvancedInventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminProductFormAdvancedInventorySection.xml index 6f388c3e6c6d1..9a198dd571def 100644 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminProductFormAdvancedInventorySection.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminProductFormAdvancedInventorySection.xml @@ -36,5 +36,7 @@ <element name="maxiQtyAllowedInCartError" type="text" selector="[name='product[stock_data][max_sale_qty]'] + label.admin__field-error"/> <element name="backorders" type="select" selector="//*[@name='product[stock_data][backorders]']"/> <element name="useConfigSettingsForBackorders" type="checkbox" selector="//input[@name='product[stock_data][use_config_backorders]']"/> + <element name="checkConfigSettingsAdvancedInventory" type="checkbox" selector="//input[@name='product[stock_data][{{args}}]']/..//label[text()='Use Config Settings']/..//input[@type='checkbox']" parameterized="true"/> + <element name="selectManageStockOption" type="select" selector="//select[@name='product[stock_data][manage_stock]']"/> </section> </sections> 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 22cb822dbe762..cefbae9305642 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml @@ -53,5 +53,13 @@ <element name="fileUploaderInput" type="file" selector="//input[@type='file' and @class='file-uploader-input']"/> <element name="variationImageSource" type="text" selector="[data-index='configurable-matrix'] [data-index='thumbnail_image_container'] img[src*='{{imageName}}']" parameterized="true"/> <element name="variationProductLinkByName" type="text" selector="//div[@data-index='configurable-matrix']//*[@data-index='name_container']//a[contains(text(), '{{productName}}')]" parameterized="true"/> + <element name="unAssignSource" type="button" selector="//span[text()='{{source_name}}']/../../..//button[@class='action-delete']//span[text()='Unassign']" parameterized="true"/> + <element name="btnAssignSources" type="button" selector="//button//span[text()='Assign Sources']/.."/> + <element name="chkSourceToAssign" type="checkbox" selector="//input[@id='idscheck{{source_id}}']/.." parameterized="true"/> + <element name="btnDoneAssignedSources" type="button" selector="//aside[@class='modal-slide product_form_product_form_sources_assign_sources_modal _show']//button[@class='action-primary']//span[text()='Done']/.." /> + <element name="searchBySource" type="input" selector="//div[contains(@data-bind,'inventory_source_listing.inventory_source_listing')]/div[2]//input[@placeholder='Search by keyword']"/> + <element name="clickSearch" type="button" selector="//div[contains(@data-bind,'inventory_source_listing.inventory_source_listing')]/div[2]//button[@aria-label='Search']"/> + <element name="btnDoneAdvancedInventory" type="button" selector="//aside[@class='modal-slide product_form_product_form_advanced_inventory_modal _show']//button[@class='action-primary']//span[text()='Done']/.." /> + </section> </sections> From 7d5df7c32a8d57fe40bec7721134cceead391c12 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Tue, 11 Apr 2023 16:18:46 +0530 Subject: [PATCH 080/277] ACQE-4425: [Test case Automation]OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest code review implementation - removed the unwanted spaces --- ...ProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml | 3 +-- .../AdminProductFormConfigurationsSection.xml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml index 0d7ca24eeb37c..cadefb96db19b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> <!-- Disable all sources and delete any pre-existing stocks --> - <actionGroup ref="DisableAllSourcesActionGroup" stepKey="DisableAllsources"/> + <actionGroup ref="DisableAllSourcesActionGroup" stepKey="DisableAllSources"/> <actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteToDefaultStock"> <argument name="stockName" value="{{_defaultStock.name}}"/> <argument name="websiteName" value="{{_defaultWebsite.name}}"/> @@ -121,6 +121,5 @@ <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> </actionGroup> <dontSee selector=".availability.only" userInput="Only 2 left" stepKey="ShouldNotSeeCurrentProductQuantity"/> - </test> </tests> 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 cefbae9305642..1ceb33a231c99 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml @@ -60,6 +60,5 @@ <element name="searchBySource" type="input" selector="//div[contains(@data-bind,'inventory_source_listing.inventory_source_listing')]/div[2]//input[@placeholder='Search by keyword']"/> <element name="clickSearch" type="button" selector="//div[contains(@data-bind,'inventory_source_listing.inventory_source_listing')]/div[2]//button[@aria-label='Search']"/> <element name="btnDoneAdvancedInventory" type="button" selector="//aside[@class='modal-slide product_form_product_form_advanced_inventory_modal _show']//button[@class='action-primary']//span[text()='Done']/.." /> - </section> </sections> From ca60fb636c4a24d393c2336b57bf8e9ac6710bac Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Tue, 11 Apr 2023 17:45:54 +0530 Subject: [PATCH 081/277] ACQE-4425: [Test case Automation]OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest code review implementation - removed all the unwanted spaces from the test case and optimised the usage of indexing --- ...tockAsNoOnTestStockAndMainWebsitesTest.xml | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml index cadefb96db19b..20c4e8011a685 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml @@ -20,19 +20,15 @@ <before> <!-- Step1: Login as Admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> - <!-- Disable all sources and delete any pre-existing stocks --> <actionGroup ref="DisableAllSourcesActionGroup" stepKey="DisableAllSources"/> <actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteToDefaultStock"> <argument name="stockName" value="{{_defaultStock.name}}"/> <argument name="websiteName" value="{{_defaultWebsite.name}}"/> </actionGroup> - <magentoCLI stepKey="reindexBefore" command="indexer:reindex"/> - <magentoCLI stepKey="flushCacheBefore" command="cache:flush"/> - <magentoCLI command="config:set cataloginventory/options/stock_threshold_qty 5" stepKey="setStockThresholdValueTo5"/> - <magentoCLI command="indexer:reindex" stepKey="reindex1"/> - <magentoCLI command="cache:flush" stepKey="flushCache1"/> + <magentoCLI stepKey="reindexPostSettingTheMainWebsiteToDefaultStock" command="indexer:reindex"/> + <magentoCLI stepKey="flushCachePostSettingTheMainWebsiteToDefaultStock" command="cache:flush"/> </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> @@ -44,16 +40,14 @@ <argument name="stockName" value="{{_defaultStock.name}}"/> <argument name="websiteName" value="{{_defaultWebsite.name}}"/> </actionGroup> - <deleteData createDataKey="createStock" stepKey="deleteStock"/> - <magentoCLI stepKey="reindexAfter" command="indexer:reindex"/> - <magentoCLI stepKey="flushCacheAfter" command="cache:flush"/> <magentoCLI command="config:set {{CatalogInventoryOptionsOnlyXleftThreshold.path}} {{CatalogInventoryOptionsOnlyXleftThreshold.value}}" stepKey="removedStockThresholdQty"/> + <magentoCLI stepKey="reindexAfterDeletingTheStock" command="indexer:reindex"/> + <magentoCLI stepKey="flushCacheAfterDeletingTheStock" command="cache:flush"/> </after> <!-- Step2: Create the Subcategory --> <createData entity="_defaultCategory" stepKey="createCategory"/> - <!-- Step3: Create the Source and the Stock --> <createData entity="BasicMsiStockWithMainWebsite1" stepKey="createStock"/> <createData entity="FullSource1" stepKey="createSource"/> @@ -61,20 +55,16 @@ <requiredEntity createDataKey="createSource"/> <requiredEntity createDataKey="createStock"/> </createData> - - <!-- Step8: Create the Simple Product --> + <!-- Create and Update the product as per the test case --> <createData entity="ApiSimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - - <!-- Update the product as per the test case --> <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForCreatedProduct"> <argument name="product" value="$$createProduct$$"/> </actionGroup> <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> <argument name="product" value="$$createProduct$$"/> </actionGroup> - <fillField userInput="10" selector="{{AdminProductFormSection.productPrice}}" stepKey="updatePriceTo10"/> <fillField userInput="1" selector="{{AdminProductFormSection.productWeight}}" stepKey="updateWeight"/> <conditionalClick selector="{{AdminProductFormConfigurationsSection.unAssignSource('Default Source')}}" dependentSelector="{{AdminProductFormConfigurationsSection.unAssignSource('Default Source')}}" visible="true" stepKey="unAssignDefaultSource"/> @@ -88,16 +78,13 @@ <fillField userInput="2" selector="{{AdminProductFormSection.assignedSourcesQty}}" stepKey="setQtyForAssignedSources"/> <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButton"/> <see userInput="You saved the product." stepKey="saveSuccessfulForManageStockAsYes"/> - - <magentoCLI stepKey="reindexForAssignedSources" command="indexer:reindex"/> - <magentoCLI stepKey="flushCacheForAssignedSources" command="cache:flush"/> - + <magentoCLI stepKey="reindexPostAssigningTheSource" command="indexer:reindex"/> + <magentoCLI stepKey="flushCachePostAssigningTheSource" command="cache:flush"/> <!-- Verify with Manage Stock set as Yes for the product --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> </actionGroup> <see selector=".availability.only" userInput="Only 2 left" stepKey="seeCurrentProductQuantity2"/> - <!-- Update the Manage Stock as No for the product --> <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForCreatedProductForManageStockAsNo"> <argument name="product" value="$$createProduct$$"/> @@ -115,11 +102,11 @@ <see userInput="You saved the product." stepKey="saveSuccessfulForManageStockAsNo"/> <magentoCLI stepKey="reindexForSettingManageStockAsNo" command="indexer:reindex"/> <magentoCLI stepKey="flushCacheForSettingManageStockAsNo" command="cache:flush"/> - <!-- Verify with Manage Stock set as No for the product --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPageOnStorefrontForManageStockAsNo"> <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> </actionGroup> <dontSee selector=".availability.only" userInput="Only 2 left" stepKey="ShouldNotSeeCurrentProductQuantity"/> + </test> </tests> From 91a8110d96e59b886a81c9a23c9f387657d946e3 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Tue, 11 Apr 2023 18:11:10 +0530 Subject: [PATCH 082/277] PR Feedbacks --- .../AccountManagement/CreateAccountTest.php | 62 +++++++++++++------ 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php index 73e8c37b15131..5026b660f5de5 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php @@ -761,7 +761,8 @@ private function getCustomTemplateId(string $templateCode): int } /** - * @magentoConfigFixture default_store newsletter/general/active 1 + * @magentoConfigFixture current_store newsletter/general/active 1 + * @magentoConfigFixture current_store newsletter/subscription/confirm 1 * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Newsletter/_files/subscribers.php * @@ -773,47 +774,53 @@ private function getCustomTemplateId(string $templateCode): int */ public function testCreateAccountWithNewsLetterSubscription() :void { - $customerEmail = 'test@example.com'; - $firstName = 'John'; - $lastName = 'Doe'; - $customer = $this->customerRepository->getById(1); - $customer->setEmail($customerEmail) - ->setFirstname($firstName) - ->setLastname($lastName); - $this->customerRepository->save($customer); - + $customerEmail = $customer->getEmail(); + $customerData = [ + 'name' => $customer->getFirstname() . ' ' . $customer->getLastname(), + 'email' => $customerEmail, + 'id' => $customer->getId(), + 'rp_token' => 'randomstring' + ]; $this->assertAndSendEmailNotification( - $customer, + $customerData, $customerEmail, - 'customer_create_account_email_template' + 'customer_create_account_email_template', + null ); /** @var Subscriber $subscriber */ $subscriber = $this->objectManager->create(Subscriber::class); $subscriber->subscribe($customerEmail); $subscriber->confirm($subscriber->getSubscriberConfirmCode()); + $confirmationLink = $subscriber->getConfirmationLink(); // Verify if the customer is subscribed to newsletter $this->assertTrue($subscriber->isSubscribed()); $this->assertAndSendEmailNotification( - $customer, + $customerData, $customerEmail, - 'newsletter_subscription_confirm_email_template' + 'newsletter_subscription_confirm_email_template', + $confirmationLink ); } /** - * @param $customer + * @param $customerData * @param $customerEmail * @param $templateIdentifier + * @param $confirmationLink * @return void * @throws LocalizedException * @throws \Magento\Framework\Exception\MailException */ - private function assertAndSendEmailNotification($customer, $customerEmail, $templateIdentifier) :void - { + private function assertAndSendEmailNotification( + $customerData, + $customerEmail, + $templateIdentifier, + $confirmationLink = null + ) :void { /** @var TransportBuilder $transportBuilder */ $transportBuilder = $this->objectManager->get(TransportBuilder::class); $transport = $transportBuilder->setTemplateIdentifier($templateIdentifier) @@ -823,7 +830,14 @@ private function assertAndSendEmailNotification($customer, $customerEmail, $temp 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID ] ) - ->setTemplateVars(['customer' => $customer]) + ->setTemplateVars( + [ + 'customer' => $customerData, + 'subscriber_data' => [ + 'confirmation_link' => $confirmationLink, + ], + ] + ) ->addTo($customerEmail) ->getTransport(); $transport->sendMessage(); @@ -833,8 +847,20 @@ private function assertAndSendEmailNotification($customer, $customerEmail, $temp switch ($templateIdentifier) { case 'customer_create_account_email_template': $this->assertEquals('Welcome to Default', $sendMessage->getSubject()); + $this->assertStringContainsString( + $customerData['name'], + $sendMessage->getBody()->getParts()[0]->getRawContent() + ); + $this->assertStringContainsString( + $customerData['email'], + $sendMessage->getBody()->getParts()[0]->getRawContent() + ); break; case 'newsletter_subscription_confirm_email_template': + $this->assertStringContainsString( + $confirmationLink, + $sendMessage->getBody()->getParts()[0]->getRawContent() + ); $this->assertEquals('Newsletter subscription confirmation', $sendMessage->getSubject()); break; } From 02d02334d0afab5cde8f68882d1ffabe2b194bbb Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Tue, 11 Apr 2023 21:15:49 +0530 Subject: [PATCH 083/277] ACQE-4823 | Integration Testing - Validate that for multi-store, The customer receives an email with a store-specific email in From header --- .../Magento/Store/Model/MultiStoreTest.php | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php new file mode 100644 index 0000000000000..37b0136c3f5c7 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -0,0 +1,153 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Store\Model; + +use Magento\Customer\Test\Fixture\Customer; +use Magento\Framework\App\Area; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Mail\Template\TransportBuilder; +use Magento\Framework\ObjectManagerInterface; +use Magento\Newsletter\Model\Subscriber; +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 as ConfigFixture; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * phpcs:disable Magento2.Security.Superglobal + */ +class MultiStoreTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var DataFixtureStorage + */ + private $fixtures; + + /** + * @inheridoc + * @throws LocalizedException + */ + protected function setUp(): void + { + parent::setUp(); + + $this->objectManager = Bootstrap::getObjectManager(); + $this->fixtures = $this->objectManager->get(DataFixtureStorageManager::class)->getStorage(); + } + + /** + * @return void + * @throws LocalizedException + * @throws \Magento\Framework\Exception\MailException + */ + #[ + ConfigFixture('system/smtp/transport', 'smtp', 'store'), + DataFixture(WebsiteFixture::class, as: 'website2'), + DataFixture(StoreGroupFixture::class, ['website_id' => '$website2.id$'], 'store_group2'), + DataFixture(StoreFixture::class, ['store_group_id' => '$store_group2.id$'], 'store2'), + DataFixture( + Customer::class, + [ + 'store_id' => '$store2.id$', + 'website_id' => '$website2.id$', + 'addresses' => [[]] + ], + as: 'customer1' + ), + DataFixture(WebsiteFixture::class, as: 'website3'), + DataFixture(StoreGroupFixture::class, ['website_id' => '$website3.id$'], 'store_group3'), + DataFixture(StoreFixture::class, ['store_group_id' => '$store_group3.id$'], 'store3'), + DataFixture( + Customer::class, + [ + 'store_id' => '$store3.id$', + 'website_id' => '$website3.id$', + 'addresses' => [[]] + ], + as: 'customer2' + ), + ] + public function testStoreSpecificEmailInFromHeader() + { + $customerOne = $this->fixtures->get('customer1'); + $storeOne = $this->fixtures->get('store2'); + $customerOneData = [ + 'email' => $customerOne->getEmail(), + 'storeId' => $storeOne->getData('store_id'), + 'storeEmail' => 'store_one@example.com' + ]; + + $this->subscribeNewsLetterAndAssertFromHeader($customerOneData); + + $customerTwo = $this->fixtures->get('customer2'); + $storeTwo = $this->fixtures->get('store3'); + $customerTwoData = [ + 'email' => $customerTwo->getEmail(), + 'storeId' => $storeTwo->getData('store_id'), + 'storeEmail' => 'store_two@example.com' + ]; + + $this->subscribeNewsLetterAndAssertFromHeader($customerTwoData); + } + + /** + * @param $customerData + * @return void + * @throws LocalizedException + * @throws \Magento\Framework\Exception\MailException + */ + private function subscribeNewsLetterAndAssertFromHeader( + $customerData + ) :void { + /** @var Subscriber $subscriber */ + $subscriber = $this->objectManager->create(Subscriber::class); + $subscriber->subscribe($customerData['email']); + $subscriber->confirm($subscriber->getSubscriberConfirmCode()); + + /** @var TransportBuilder $transportBuilder */ + $transportBuilder = $this->objectManager->get(TransportBuilder::class); + $transport = $transportBuilder->setTemplateIdentifier('newsletter_subscription_confirm_email_template') + ->setTemplateOptions( + [ + 'area' => Area::AREA_FRONTEND, + 'store' => (int) $customerData['storeId'] + ] + ) + ->setFromByScope( + [ + 'email' => $customerData['storeEmail'], + 'name' => 'Store Email Name' + ], + (int) $customerData['storeId'] + ) + ->setTemplateVars( + [ + 'subscriber_data' => [ + 'confirmation_link' => $subscriber->getConfirmationLink(), + ], + ] + ) + ->addTo($customerData['email']) + ->getTransport(); + $transport->sendMessage(); + $headers = $transport->getMessage()->getHeaders(); + $sendMessage = $transport->getMessage(); + $this->assertNotNull($sendMessage); + $this->assertStringContainsString($customerData['storeEmail'], $headers['From']); + } +} From bf3a2d0f423812f50a8a4379d9bdfb55d9ac0603 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Wed, 12 Apr 2023 11:14:41 +0530 Subject: [PATCH 084/277] Integration Test Fix --- .../testsuite/Magento/Store/Model/MultiStoreTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php index 37b0136c3f5c7..8d856c765a196 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -87,7 +87,7 @@ public function testStoreSpecificEmailInFromHeader() $customerOne = $this->fixtures->get('customer1'); $storeOne = $this->fixtures->get('store2'); $customerOneData = [ - 'email' => $customerOne->getEmail(), + 'email' => $customerOne->getData('email'), 'storeId' => $storeOne->getData('store_id'), 'storeEmail' => 'store_one@example.com' ]; @@ -97,7 +97,7 @@ public function testStoreSpecificEmailInFromHeader() $customerTwo = $this->fixtures->get('customer2'); $storeTwo = $this->fixtures->get('store3'); $customerTwoData = [ - 'email' => $customerTwo->getEmail(), + 'email' => $customerTwo->getData('email'), 'storeId' => $storeTwo->getData('store_id'), 'storeEmail' => 'store_two@example.com' ]; From c7569f680f598a34a7354a9cdcb15cc4a45c4efc Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Wed, 12 Apr 2023 13:36:30 +0530 Subject: [PATCH 085/277] Integration Test Fix --- .../testsuite/Magento/Store/Model/MultiStoreTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php index 8d856c765a196..f168f8bb19c74 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -82,12 +82,12 @@ protected function setUp(): void as: 'customer2' ), ] - public function testStoreSpecificEmailInFromHeader() + public function testStoreSpecificEmailInFromHeader() :void { $customerOne = $this->fixtures->get('customer1'); $storeOne = $this->fixtures->get('store2'); $customerOneData = [ - 'email' => $customerOne->getData('email'), + 'email' => $customerOne->getDataByKey('email'), 'storeId' => $storeOne->getData('store_id'), 'storeEmail' => 'store_one@example.com' ]; @@ -97,7 +97,7 @@ public function testStoreSpecificEmailInFromHeader() $customerTwo = $this->fixtures->get('customer2'); $storeTwo = $this->fixtures->get('store3'); $customerTwoData = [ - 'email' => $customerTwo->getData('email'), + 'email' => $customerTwo->getDataByKey('email'), 'storeId' => $storeTwo->getData('store_id'), 'storeEmail' => 'store_two@example.com' ]; From db13fa23d4b685d09b49680f3e93d42e19d7b0fa Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 13 Apr 2023 16:38:49 +0530 Subject: [PATCH 086/277] ACQE-4774 | PR Feedbacks --- .../AccountManagement/CreateAccountTest.php | 110 ------------------ .../Newsletter/Model/Plugin/PluginTest.php | 76 ++++++++++++ 2 files changed, 76 insertions(+), 110 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php index 5026b660f5de5..bd2c26e449d72 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagement/CreateAccountTest.php @@ -32,10 +32,6 @@ use Magento\TestFramework\Helper\Xpath; use Magento\TestFramework\Mail\Template\TransportBuilderMock; use PHPUnit\Framework\TestCase; -use Magento\Newsletter\Model\Subscriber; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\App\Area; -use Magento\Framework\Mail\Template\TransportBuilder; /** * Tests for customer creation via customer account management service. @@ -759,110 +755,4 @@ private function getCustomTemplateId(string $templateCode): int ->getFirstItem() ->getId(); } - - /** - * @magentoConfigFixture current_store newsletter/general/active 1 - * @magentoConfigFixture current_store newsletter/subscription/confirm 1 - * @magentoDataFixture Magento/Customer/_files/customer.php - * @magentoDataFixture Magento/Newsletter/_files/subscribers.php - * - * @return void - * @throws InputException - * @throws InputMismatchException - * @throws LocalizedException - * @throws NoSuchEntityException - */ - public function testCreateAccountWithNewsLetterSubscription() :void - { - $customer = $this->customerRepository->getById(1); - $customerEmail = $customer->getEmail(); - $customerData = [ - 'name' => $customer->getFirstname() . ' ' . $customer->getLastname(), - 'email' => $customerEmail, - 'id' => $customer->getId(), - 'rp_token' => 'randomstring' - ]; - $this->assertAndSendEmailNotification( - $customerData, - $customerEmail, - 'customer_create_account_email_template', - null - ); - - /** @var Subscriber $subscriber */ - $subscriber = $this->objectManager->create(Subscriber::class); - $subscriber->subscribe($customerEmail); - $subscriber->confirm($subscriber->getSubscriberConfirmCode()); - $confirmationLink = $subscriber->getConfirmationLink(); - - // Verify if the customer is subscribed to newsletter - $this->assertTrue($subscriber->isSubscribed()); - - $this->assertAndSendEmailNotification( - $customerData, - $customerEmail, - 'newsletter_subscription_confirm_email_template', - $confirmationLink - ); - } - - /** - * @param $customerData - * @param $customerEmail - * @param $templateIdentifier - * @param $confirmationLink - * @return void - * @throws LocalizedException - * @throws \Magento\Framework\Exception\MailException - */ - private function assertAndSendEmailNotification( - $customerData, - $customerEmail, - $templateIdentifier, - $confirmationLink = null - ) :void { - /** @var TransportBuilder $transportBuilder */ - $transportBuilder = $this->objectManager->get(TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier($templateIdentifier) - ->setTemplateOptions( - [ - 'area' => Area::AREA_FRONTEND, - 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID - ] - ) - ->setTemplateVars( - [ - 'customer' => $customerData, - 'subscriber_data' => [ - 'confirmation_link' => $confirmationLink, - ], - ] - ) - ->addTo($customerEmail) - ->getTransport(); - $transport->sendMessage(); - $sendMessage = $transport->getMessage(); - $this->assertNotNull($sendMessage); - - switch ($templateIdentifier) { - case 'customer_create_account_email_template': - $this->assertEquals('Welcome to Default', $sendMessage->getSubject()); - $this->assertStringContainsString( - $customerData['name'], - $sendMessage->getBody()->getParts()[0]->getRawContent() - ); - $this->assertStringContainsString( - $customerData['email'], - $sendMessage->getBody()->getParts()[0]->getRawContent() - ); - break; - case 'newsletter_subscription_confirm_email_template': - $this->assertStringContainsString( - $confirmationLink, - $sendMessage->getBody()->getParts()[0]->getRawContent() - ); - $this->assertEquals('Newsletter subscription confirmation', $sendMessage->getSubject()); - break; - } - } } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index 719d78b07ca3c..095f092ee7729 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -6,6 +6,7 @@ namespace Magento\Newsletter\Model\Plugin; use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Mail\Template\TransportBuilderMock; /** * @magentoAppIsolation enabled @@ -24,6 +25,11 @@ class PluginTest extends \PHPUnit\Framework\TestCase */ protected $customerRepository; + /** + * @var TransportBuilderMock + */ + protected $transportBuilderMock; + protected function setUp(): void { $this->accountManagement = Bootstrap::getObjectManager()->get( @@ -32,6 +38,9 @@ protected function setUp(): void $this->customerRepository = Bootstrap::getObjectManager()->get( \Magento\Customer\Api\CustomerRepositoryInterface::class ); + $this->transportBuilderMock = Bootstrap::getObjectManager()->get( + TransportBuilderMock::class + ); } protected function tearDown(): void @@ -223,4 +232,71 @@ public function testCustomerWithTwoNewsLetterSubscriptions() $extensionAttributes = $customer->getExtensionAttributes(); $this->assertTrue($extensionAttributes->getIsSubscribed()); } + + /** + * @magentoAppArea adminhtml + * @magentoDbIsolation enabled + * @magentoConfigFixture current_store newsletter/general/active 1 + * @magentoDataFixture Magento/Customer/_files/customer_welcome_email_template.php + * + * @return void + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function testCreateAccountWithNewsLetterSubscription() :void + { + $objectManager = Bootstrap::getObjectManager(); + /** @var \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerFactory */ + $customerFactory = $objectManager->get(\Magento\Customer\Api\Data\CustomerInterfaceFactory::class); + $customerDataObject = $customerFactory->create() + ->setFirstname('John') + ->setLastname('Doe') + ->setEmail('customer@example.com'); + $extensionAttributes = $customerDataObject->getExtensionAttributes(); + $extensionAttributes->setIsSubscribed(true); + $customerDataObject->setExtensionAttributes($extensionAttributes); + $this->accountManagement->createAccount($customerDataObject, '123123qW'); + + $message = $this->transportBuilderMock->getSentMessage(); + + $this->assertEquals('Welcome to Main Website Store', $message->getSubject()); + $this->assertStringContainsString( + 'John', + $message->getBody()->getParts()[0]->getRawContent() + ); + $this->assertStringContainsString( + 'customer@example.com', + $message->getBody()->getParts()[0]->getRawContent() + ); + + /** @var \Magento\Newsletter\Model\Subscriber $subscriber */ + $subscriber = $objectManager->create(\Magento\Newsletter\Model\Subscriber::class); + $subscriber->loadByEmail('customer@example.com'); + $this->assertTrue($subscriber->isSubscribed()); + + /** @var \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder */ + $transportBuilder = $objectManager->get(\Magento\Framework\Mail\Template\TransportBuilder::class); + $transport = $transportBuilder->setTemplateIdentifier('newsletter_subscription_confirm_email_template') + ->setTemplateOptions( + [ + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, + 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID + ] + ) + ->setTemplateVars( + [ + 'subscriber_data' => [ + 'confirmation_link' => $subscriber->getConfirmationLink(), + ], + ] + ) + ->addTo('customer@example.com') + ->getTransport(); + $sendMessage = $transport->getMessage(); + + $this->assertStringContainsString( + $subscriber->getConfirmationLink(), + $sendMessage->getBody()->getParts()[0]->getRawContent() + ); + $this->assertEquals('Newsletter subscription confirmation', $sendMessage->getSubject()); + } } From b8e524246eb50e6c8ab25545f7da256581f5e6ba Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 13 Apr 2023 17:36:53 +0530 Subject: [PATCH 087/277] ACQE-4774 | Static Test Fix --- .../testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index 095f092ee7729..1729b01e7a5e4 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -9,6 +9,8 @@ use Magento\TestFramework\Mail\Template\TransportBuilderMock; /** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * phpcs:disable Magento2.Security.Superglobal * @magentoAppIsolation enabled */ class PluginTest extends \PHPUnit\Framework\TestCase From cc88074cb4c4ff46231f25498a721c7da667f762 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 13 Apr 2023 21:07:59 +0530 Subject: [PATCH 088/277] ACQE-4774 | Static Test Fix --- .../Newsletter/Model/Plugin/PluginTest.php | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index 1729b01e7a5e4..274438b4c3420 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -257,7 +257,6 @@ public function testCreateAccountWithNewsLetterSubscription() :void $extensionAttributes->setIsSubscribed(true); $customerDataObject->setExtensionAttributes($extensionAttributes); $this->accountManagement->createAccount($customerDataObject, '123123qW'); - $message = $this->transportBuilderMock->getSentMessage(); $this->assertEquals('Welcome to Main Website Store', $message->getSubject()); @@ -275,30 +274,25 @@ public function testCreateAccountWithNewsLetterSubscription() :void $subscriber->loadByEmail('customer@example.com'); $this->assertTrue($subscriber->isSubscribed()); - /** @var \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder */ - $transportBuilder = $objectManager->get(\Magento\Framework\Mail\Template\TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier('newsletter_subscription_confirm_email_template') - ->setTemplateOptions( - [ - 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, - 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID - ] - ) - ->setTemplateVars( - [ - 'subscriber_data' => [ - 'confirmation_link' => $subscriber->getConfirmationLink(), - ], - ] - ) - ->addTo('customer@example.com') - ->getTransport(); - $sendMessage = $transport->getMessage(); + $transport = $this->transportBuilderMock->setTemplateIdentifier( + 'newsletter_subscription_confirm_email_template' + )->setTemplateVars([ + 'subscriber_data' => [ + 'confirmation_link' => $subscriber->getConfirmationLink(), + ], + ])->setTemplateOptions([ + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, + 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID + ]) + ->addTo('customer@example.com') + ->getTransport(); + + $message = $transport->getMessage(); $this->assertStringContainsString( $subscriber->getConfirmationLink(), - $sendMessage->getBody()->getParts()[0]->getRawContent() + $message->getBody()->getParts()[0]->getRawContent() ); - $this->assertEquals('Newsletter subscription confirmation', $sendMessage->getSubject()); + $this->assertEquals('Newsletter subscription confirmation', $message->getSubject()); } } From 3e4b97a318d10d01c99bb58fb5a2ed843cd63b14 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 13 Apr 2023 21:12:14 +0530 Subject: [PATCH 089/277] ACQE-4750 | PR Feedback --- .../Adminhtml/UserResetPasswordEmailTest.php | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) 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 21ac635e61b87..be5177b1cbe0f 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -120,23 +120,25 @@ public function testAdminEmailNotificationAfterPasswordChange() :void $adminUser->setPassword('newPassword123'); $adminUser->save(); - /** @var TransportBuilder $transportBuilder */ - $transportBuilder = $this->_objectManager->get(TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier('customer_password_reset_password_template') - ->setTemplateOptions( - [ - 'area' => Area::AREA_FRONTEND, - 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID - ] - ) - ->setTemplateVars(['customer' => $adminUser]) - ->addTo($adminEmail) - ->getTransport(); - $transport->sendMessage(); - $sentMessage = $transport->getMessage(); + /** @var TransportBuilderMock $transportBuilderMock */ + $transportBuilderMock = $this->_objectManager->get(TransportBuilderMock::class); + $transport = $transportBuilderMock->setTemplateIdentifier( + 'customer_password_reset_password_template' + )->setTemplateVars([ + 'customer' => [ + 'name' => $user->getDataByKey('firstname') . ' ' . $user->getDataByKey('lastname') + ] + ])->setTemplateOptions([ + 'area' => Area::AREA_FRONTEND, + 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID + ]) + ->addTo($adminEmail) + ->getTransport(); + + $message = $transport->getMessage(); // Verify an email was dispatched to the correct user $this->assertNotNull($transport->getMessage()); - $this->assertEquals($adminEmail, $sentMessage->getTo()[0]->getEmail()); + $this->assertEquals($adminEmail, $message->getTo()[0]->getEmail()); } } From 80e06b570d8482f49ad5916df24dcfb03c644546 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 13 Apr 2023 21:13:22 +0530 Subject: [PATCH 090/277] ACQE-4750 | PR Feedback --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 1 - 1 file changed, 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 be5177b1cbe0f..43fa28b6ffc33 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -10,7 +10,6 @@ use Magento\Framework\App\Area; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Mail\EmailMessage; -use Magento\Framework\Mail\Template\TransportBuilder; use Magento\Store\Model\Store; use Magento\TestFramework\Fixture\Config as Config; use Magento\TestFramework\Fixture\DataFixture; From bbe2c45c5ea57b1f90d9f2528c2885e92af6f555 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 13 Apr 2023 21:34:45 +0530 Subject: [PATCH 091/277] ACQE-4823 | PR Feedback --- .../Magento/Store/Model/MultiStoreTest.php | 57 +++++++++---------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php index f168f8bb19c74..c4ade6ec6d87d 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -10,7 +10,6 @@ use Magento\Customer\Test\Fixture\Customer; use Magento\Framework\App\Area; use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Mail\Template\TransportBuilder; use Magento\Framework\ObjectManagerInterface; use Magento\Newsletter\Model\Subscriber; use Magento\Store\Test\Fixture\Group as StoreGroupFixture; @@ -20,7 +19,9 @@ 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; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -56,6 +57,7 @@ protected function setUp(): void * @throws \Magento\Framework\Exception\MailException */ #[ + DbIsolation(false), ConfigFixture('system/smtp/transport', 'smtp', 'store'), DataFixture(WebsiteFixture::class, as: 'website2'), DataFixture(StoreGroupFixture::class, ['website_id' => '$website2.id$'], 'store_group2'), @@ -117,37 +119,32 @@ private function subscribeNewsLetterAndAssertFromHeader( /** @var Subscriber $subscriber */ $subscriber = $this->objectManager->create(Subscriber::class); $subscriber->subscribe($customerData['email']); - $subscriber->confirm($subscriber->getSubscriberConfirmCode()); - /** @var TransportBuilder $transportBuilder */ - $transportBuilder = $this->objectManager->get(TransportBuilder::class); - $transport = $transportBuilder->setTemplateIdentifier('newsletter_subscription_confirm_email_template') - ->setTemplateOptions( - [ - 'area' => Area::AREA_FRONTEND, - 'store' => (int) $customerData['storeId'] - ] - ) - ->setFromByScope( - [ - 'email' => $customerData['storeEmail'], - 'name' => 'Store Email Name' - ], - (int) $customerData['storeId'] - ) - ->setTemplateVars( - [ - 'subscriber_data' => [ - 'confirmation_link' => $subscriber->getConfirmationLink(), - ], - ] - ) - ->addTo($customerData['email']) - ->getTransport(); - $transport->sendMessage(); + /** @var TransportBuilderMock $transportBuilderMock */ + $transportBuilderMock = $this->objectManager->get(TransportBuilderMock::class); + $transport = $transportBuilderMock->setTemplateIdentifier( + 'customer_password_reset_password_template' + )->setTemplateVars([ + 'subscriber_data' => [ + 'confirmation_link' => $subscriber->getConfirmationLink(), + ], + ])->setTemplateOptions([ + 'area' => Area::AREA_FRONTEND, + 'store' => (int) $customerData['storeId'] + ]) + ->setFromByScope( + [ + 'email' => $customerData['storeEmail'], + 'name' => 'Store Email Name' + ], + (int) $customerData['storeId'] + ) + ->addTo($customerData['email']) + ->getTransport(); + $headers = $transport->getMessage()->getHeaders(); - $sendMessage = $transport->getMessage(); - $this->assertNotNull($sendMessage); + + $this->assertNotNull($transport->getMessage()); $this->assertStringContainsString($customerData['storeEmail'], $headers['From']); } } From 7cc24e1312b9e0ec6ff62f10ff874ff26564fdde Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 11:40:20 +0530 Subject: [PATCH 092/277] ACQE-4774 | PR Feedback --- .../testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index 274438b4c3420..0a53142ce4e73 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -287,7 +287,7 @@ public function testCreateAccountWithNewsLetterSubscription() :void ->addTo('customer@example.com') ->getTransport(); - $message = $transport->getMessage(); + $message = $this->transportBuilderMock->getSentMessage(); $this->assertStringContainsString( $subscriber->getConfirmationLink(), From 6ea80d786de67991ece4eaeeb3326be1da7b82cb Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 11:45:14 +0530 Subject: [PATCH 093/277] ACQE-4823 | PR Feedback --- .../testsuite/Magento/Store/Model/MultiStoreTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php index c4ade6ec6d87d..853a53782dd9f 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -142,7 +142,7 @@ private function subscribeNewsLetterAndAssertFromHeader( ->addTo($customerData['email']) ->getTransport(); - $headers = $transport->getMessage()->getHeaders(); + $headers = $transportBuilderMock->getSentMessage()->getHeaders(); $this->assertNotNull($transport->getMessage()); $this->assertStringContainsString($customerData['storeEmail'], $headers['From']); From 5da33ae7c509595008bfb666a214b09b580abb8f Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 11:47:02 +0530 Subject: [PATCH 094/277] ACQE-4823 | PR Feedback --- .../testsuite/Magento/Store/Model/MultiStoreTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php index 853a53782dd9f..9e86df879f4e0 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -144,7 +144,7 @@ private function subscribeNewsLetterAndAssertFromHeader( $headers = $transportBuilderMock->getSentMessage()->getHeaders(); - $this->assertNotNull($transport->getMessage()); + $this->assertNotNull($transportBuilderMock->getSentMessage()); $this->assertStringContainsString($customerData['storeEmail'], $headers['From']); } } From cd783465be6d9f2145aad5738bc93ebfce4964f5 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 11:51:13 +0530 Subject: [PATCH 095/277] ACQE-4750 | PR Feedback --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 43fa28b6ffc33..7ae3af7ab267a 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -134,10 +134,10 @@ public function testAdminEmailNotificationAfterPasswordChange() :void ->addTo($adminEmail) ->getTransport(); - $message = $transport->getMessage(); + $message = $transportBuilderMock->getSentMessage(); // Verify an email was dispatched to the correct user - $this->assertNotNull($transport->getMessage()); + $this->assertNotNull($transportBuilderMock->getSentMessage()); $this->assertEquals($adminEmail, $message->getTo()[0]->getEmail()); } } From 4953218fc556c9d20cd2aa792e0b0631a031235c Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 12:35:31 +0530 Subject: [PATCH 096/277] ACQE-4750 | Static Test Fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 2 +- 1 file changed, 1 insertion(+), 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 7ae3af7ab267a..52250d41b34e3 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -121,7 +121,7 @@ public function testAdminEmailNotificationAfterPasswordChange() :void /** @var TransportBuilderMock $transportBuilderMock */ $transportBuilderMock = $this->_objectManager->get(TransportBuilderMock::class); - $transport = $transportBuilderMock->setTemplateIdentifier( + $transportBuilderMock->setTemplateIdentifier( 'customer_password_reset_password_template' )->setTemplateVars([ 'customer' => [ From 222cb2168a5a37a3c318711cf983095e4e83e2c0 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 12:38:27 +0530 Subject: [PATCH 097/277] ACQE-4774 | Static Test Fix --- .../testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index 0a53142ce4e73..da279101ba96f 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -274,7 +274,7 @@ public function testCreateAccountWithNewsLetterSubscription() :void $subscriber->loadByEmail('customer@example.com'); $this->assertTrue($subscriber->isSubscribed()); - $transport = $this->transportBuilderMock->setTemplateIdentifier( + $this->transportBuilderMock->setTemplateIdentifier( 'newsletter_subscription_confirm_email_template' )->setTemplateVars([ 'subscriber_data' => [ From b77d5eea9f36c9736696da63c20837cdebf03193 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Mon, 17 Apr 2023 12:41:44 +0530 Subject: [PATCH 098/277] ACQE-4823 | Static Test Fix --- .../testsuite/Magento/Store/Model/MultiStoreTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php index 9e86df879f4e0..1c19a80e7f35f 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/MultiStoreTest.php @@ -122,7 +122,7 @@ private function subscribeNewsLetterAndAssertFromHeader( /** @var TransportBuilderMock $transportBuilderMock */ $transportBuilderMock = $this->objectManager->get(TransportBuilderMock::class); - $transport = $transportBuilderMock->setTemplateIdentifier( + $transportBuilderMock->setTemplateIdentifier( 'customer_password_reset_password_template' )->setTemplateVars([ 'subscriber_data' => [ From a4bf464a84c52a3d271ce43505399c59c98c0e1b Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Mon, 17 Apr 2023 14:46:19 +0530 Subject: [PATCH 099/277] AC-3963 : As a Merchant I want to be able to configure store information data --- .../AdminConfigureStoreInformationTest.xml | 109 ++++++++++++++++++ ...peanCountriesSystemCheckBoxActionGroup.xml | 19 +++ .../Mftf/Data/CountryOptionConfigData.xml | 4 + 3 files changed, 132 insertions(+) create mode 100644 app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml create mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml new file mode 100644 index 0000000000000..213c11f62fee8 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml @@ -0,0 +1,109 @@ +<?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="AdminConfigureStoreInformationTest"> + <annotations> + <features value="Cms"/> + <stories value="able to configure store information data"/> + <title value="Admin Configure Store Information"/> + <description value="As a Merchant I want to be able to configure store information data"/> + <severity value="MAJOR"/> + <testCaseId value="AC-3963"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> + </before> + <after> + <actionGroup ref="AdminSetStoreInformationConfigurationActionGroup" stepKey="resetStoreInformationConfig"> + <argument name="storeName" value=""/> + <argument name="storeHoursOfOperation" value=""/> + <argument name="vatNumber" value=""/> + <argument name="telephone" value=""/> + <argument name="country" value=""/> + <argument name="state" value=""/> + <argument name="city" value=""/> + <argument name="postcode" value=""/> + <argument name="street" value=""/> + </actionGroup> + <actionGroup ref="DeletePageByUrlKeyActionGroup" stepKey="deletePage"> + <argument name="UrlKey" value="{{_defaultCmsPage.identifier}}"/> + </actionGroup> + <actionGroup ref="EuropeanCountriesOptionActionGroup" stepKey="checkConfig"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <!--Set StoreInformation configs data--> + <actionGroup ref="AdminSetStoreInformationConfigurationActionGroup" stepKey="setStoreInformationConfigData"> + <argument name="telephone" value="{{DE_Address_Berlin_Not_Default_Address.telephone}}"/> + <argument name="country" value="{{DE_Address_Berlin_Not_Default_Address.country_id}}"/> + <argument name="state" value="{{DE_Address_Berlin_Not_Default_Address.state}}"/> + <argument name="city" value="{{DE_Address_Berlin_Not_Default_Address.city}}"/> + <argument name="postcode" value="{{DE_Address_Berlin_Not_Default_Address.postcode}}"/> + <argument name="street" value="{{DE_Address_Berlin_Not_Default_Address.street[0]}}"/> + </actionGroup> + <magentoCLI command="config:set {{SetEuropeanUnionCountries.path}} {{SetEuropeanUnionCountries.value}}" stepKey="selectEUCountries"/> + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="navigateToCmsPageGrid"/> + <click selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="clickAddNewPage"/> + <fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_defaultCmsPage.title}}" stepKey="fillFieldTitle"/> + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/> + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> + <actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer"> + <argument name="contentType" value="PageBuilderRowContentType"/> + <argument name="containerTargetType" value="PageBuilderRootContainerContentType"/> + </actionGroup> + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> + <argument name="contentType" value="PageBuilderTextContentType"/> + </actionGroup> + <actionGroup ref="dragContentTypeToStage" stepKey="dragIntoStage"> + <argument name="contentType" value="PageBuilderTextContentType"/> + </actionGroup> + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> + <argument name="contentType" value="PageBuilderTextContentType"/> + </actionGroup> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButton1"/> + <wait time="2" stepKey="waitForLoadOne"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Store Name')}}" stepKey="selectDefaultVariable"/> + <wait time="2" stepKey="waitForLoad121"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableone"/> + <wait time="2" stepKey="waitForLoadTwo"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButtonTwo"/> + <wait time="2" stepKey="waitForLoadThree"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Street Address')}}" stepKey="selectDefaultVariable1"/> + <wait time="2" stepKey="waitForLoadFour"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableTwo"/> + <wait time="2" stepKey="waitForLoadFive"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain"/> + <wait time="2" stepKey="waitForLoadSix"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / City')}}" stepKey="selectDefaultVariable2"/> + <wait time="2" stepKey="waitForLoadSeaven"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableThree"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain1"/> + <wait time="2" stepKey="waitForLoadEight"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / ZIP/Postal Code')}}" stepKey="selectDefaultVariable3"/> + <wait time="2" stepKey="waitForLoadNine"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableFour"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain2"/> + <wait time="2" stepKey="waitForLoadTen"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Region/State')}}" stepKey="selectDefaultVariable4"/> + <wait time="2" stepKey="waitForLoadEleaven"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableFive"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain9"/> + <wait time="2" stepKey="waitForLoadTwelve"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Country')}}" stepKey="selectDefaultVariable5"/> + <wait time="2" stepKey="waitForLoadThirteen"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableSix"/> + <wait time="2" stepKey="waitForLoadFourteen"/> + <click selector="{{TextOnConfiguration.savePage}}" stepKey="clickOnSave"/> + <wait time="2" stepKey="waitForLoadFifteen"/> + <click selector="{{TextOnConfiguration.arrowPage}}" stepKey="clickOnArrow"/> + <click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/> + <fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/> + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAgain"/> + <amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPageRefresh"/> + </test> +</tests> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml new file mode 100644 index 0000000000000..b19ab17193d12 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml @@ -0,0 +1,19 @@ +<?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="EuropeanCountriesOptionActionGroup" extends="EuropeanCountriesOptionActionGroup"> + <annotations> + <description>check system value european country option value</description> + </annotations> + + <remove keyForRemoval="uncheckConfigSetting"/> + <checkOption selector="{{CountriesFormSection.useConfigSettings}}" stepKey="checkConfigSetting"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Config/Test/Mftf/Data/CountryOptionConfigData.xml b/app/code/Magento/Config/Test/Mftf/Data/CountryOptionConfigData.xml index 378aa0bfc510c..59c70ff68f419 100644 --- a/app/code/Magento/Config/Test/Mftf/Data/CountryOptionConfigData.xml +++ b/app/code/Magento/Config/Test/Mftf/Data/CountryOptionConfigData.xml @@ -30,4 +30,8 @@ <data key="scope">websites</data> <data key="scope_code">base</data> </entity> + <entity name="SetEuropeanUnionCountries"> + <data key="path">general/country/eu_countries</data> + <data key="value">GB,DE,FR</data> + </entity> </entities> From e5782866985d4df8ac9d206f1586c2b7cff2daf5 Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Mon, 17 Apr 2023 21:28:18 +0530 Subject: [PATCH 100/277] ACQE-3393 : Added meaningful stepkeys --- .../AdminConfigureStoreInformationTest.xml | 137 +++++++++--------- ...peanCountriesSystemCheckBoxActionGroup.xml | 9 +- 2 files changed, 75 insertions(+), 71 deletions(-) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml index 213c11f62fee8..46fa22f81d3f9 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml @@ -17,7 +17,7 @@ <testCaseId value="AC-3963"/> </annotations> <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToBackend"/> </before> <after> <actionGroup ref="AdminSetStoreInformationConfigurationActionGroup" stepKey="resetStoreInformationConfig"> @@ -34,76 +34,75 @@ <actionGroup ref="DeletePageByUrlKeyActionGroup" stepKey="deletePage"> <argument name="UrlKey" value="{{_defaultCmsPage.identifier}}"/> </actionGroup> - <actionGroup ref="EuropeanCountriesOptionActionGroup" stepKey="checkConfig"/> + <actionGroup ref="EuropeanCountriesSystemCheckBoxActionGroup" stepKey="checkSystemValueConfig"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Set StoreInformation configs data--> - <actionGroup ref="AdminSetStoreInformationConfigurationActionGroup" stepKey="setStoreInformationConfigData"> - <argument name="telephone" value="{{DE_Address_Berlin_Not_Default_Address.telephone}}"/> - <argument name="country" value="{{DE_Address_Berlin_Not_Default_Address.country_id}}"/> - <argument name="state" value="{{DE_Address_Berlin_Not_Default_Address.state}}"/> - <argument name="city" value="{{DE_Address_Berlin_Not_Default_Address.city}}"/> - <argument name="postcode" value="{{DE_Address_Berlin_Not_Default_Address.postcode}}"/> - <argument name="street" value="{{DE_Address_Berlin_Not_Default_Address.street[0]}}"/> - </actionGroup> - <magentoCLI command="config:set {{SetEuropeanUnionCountries.path}} {{SetEuropeanUnionCountries.value}}" stepKey="selectEUCountries"/> - <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="navigateToCmsPageGrid"/> - <click selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="clickAddNewPage"/> - <fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_defaultCmsPage.title}}" stepKey="fillFieldTitle"/> - <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/> - <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> - <actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer"> - <argument name="contentType" value="PageBuilderRowContentType"/> - <argument name="containerTargetType" value="PageBuilderRootContainerContentType"/> - </actionGroup> - <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> - <argument name="contentType" value="PageBuilderTextContentType"/> - </actionGroup> - <actionGroup ref="dragContentTypeToStage" stepKey="dragIntoStage"> - <argument name="contentType" value="PageBuilderTextContentType"/> - </actionGroup> - <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> - <argument name="contentType" value="PageBuilderTextContentType"/> - </actionGroup> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButton1"/> - <wait time="2" stepKey="waitForLoadOne"/> - <click selector="{{VariableSection.VariableRadio('General / Store Information / Store Name')}}" stepKey="selectDefaultVariable"/> - <wait time="2" stepKey="waitForLoad121"/> - <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableone"/> - <wait time="2" stepKey="waitForLoadTwo"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButtonTwo"/> - <wait time="2" stepKey="waitForLoadThree"/> - <click selector="{{VariableSection.VariableRadio('General / Store Information / Street Address')}}" stepKey="selectDefaultVariable1"/> - <wait time="2" stepKey="waitForLoadFour"/> - <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableTwo"/> - <wait time="2" stepKey="waitForLoadFive"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain"/> - <wait time="2" stepKey="waitForLoadSix"/> - <click selector="{{VariableSection.VariableRadio('General / Store Information / City')}}" stepKey="selectDefaultVariable2"/> - <wait time="2" stepKey="waitForLoadSeaven"/> - <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableThree"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain1"/> - <wait time="2" stepKey="waitForLoadEight"/> - <click selector="{{VariableSection.VariableRadio('General / Store Information / ZIP/Postal Code')}}" stepKey="selectDefaultVariable3"/> - <wait time="2" stepKey="waitForLoadNine"/> - <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableFour"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain2"/> - <wait time="2" stepKey="waitForLoadTen"/> - <click selector="{{VariableSection.VariableRadio('General / Store Information / Region/State')}}" stepKey="selectDefaultVariable4"/> - <wait time="2" stepKey="waitForLoadEleaven"/> - <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableFive"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainAgain9"/> - <wait time="2" stepKey="waitForLoadTwelve"/> - <click selector="{{VariableSection.VariableRadio('General / Store Information / Country')}}" stepKey="selectDefaultVariable5"/> - <wait time="2" stepKey="waitForLoadThirteen"/> - <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableSix"/> - <wait time="2" stepKey="waitForLoadFourteen"/> - <click selector="{{TextOnConfiguration.savePage}}" stepKey="clickOnSave"/> - <wait time="2" stepKey="waitForLoadFifteen"/> - <click selector="{{TextOnConfiguration.arrowPage}}" stepKey="clickOnArrow"/> - <click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/> - <fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/> - <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAgain"/> - <amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPageRefresh"/> + <actionGroup ref="AdminSetStoreInformationConfigurationActionGroup" stepKey="setStoreInformationConfigData"> + <argument name="telephone" value="{{DE_Address_Berlin_Not_Default_Address.telephone}}"/> + <argument name="country" value="{{DE_Address_Berlin_Not_Default_Address.country_id}}"/> + <argument name="state" value="{{DE_Address_Berlin_Not_Default_Address.state}}"/> + <argument name="city" value="{{DE_Address_Berlin_Not_Default_Address.city}}"/> + <argument name="postcode" value="{{DE_Address_Berlin_Not_Default_Address.postcode}}"/> + <argument name="street" value="{{DE_Address_Berlin_Not_Default_Address.street[0]}}"/> + </actionGroup> + <magentoCLI command="config:set {{SetEuropeanUnionCountries.path}} {{SetEuropeanUnionCountries.value}}" stepKey="selectEUCountries"/> + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="navigateToCmsPageGrid"/> + <click selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="clickAddNewPage"/> + <fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_defaultCmsPage.title}}" stepKey="fillFieldTitle"/> + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/> + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> + <actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer"> + <argument name="contentType" value="PageBuilderRowContentType"/> + <argument name="containerTargetType" value="PageBuilderRootContainerContentType"/> + </actionGroup> + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> + <argument name="contentType" value="PageBuilderTextContentType"/> + </actionGroup> + <actionGroup ref="dragContentTypeToStage" stepKey="dragIntoStage"> + <argument name="contentType" value="PageBuilderTextContentType"/> + </actionGroup> + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> + <argument name="contentType" value="PageBuilderTextContentType"/> + </actionGroup> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButton"/> + <wait time="2" stepKey="waitForPageToLoadForToInsertButtonForStoreName"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Store Name')}}" stepKey="selectDefaultVariable"/> + <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStoreName"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForStAds"/> + <wait time="2" stepKey="waitForPageToLoadToSelectInsertVariableButtonForStAds"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableButtonForStAds"/> + <wait time="2" stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStAds"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Street Address')}}" stepKey="selectDefaultVariableForStAds"/> + <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStAds"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForStore"/> + <wait time="2" stepKey="waitForPageToLoadForToInsertButtonForStore"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableForStore"/> + <wait time="2" stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStore"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / City')}}" stepKey="selectDefaultVariableForStore"/> + <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStore"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForCode"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCode"/> + <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCode"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / ZIP/Postal Code')}}" stepKey="selectDefaultVariableForCode"/> + <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableCode"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForState"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForState"/> + <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForState"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Region/State')}}" stepKey="selectDefaultVariableForState"/> + <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableForState"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForCountry"/> + <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCountry"/> + <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCountry"/> + <click selector="{{VariableSection.VariableRadio('General / Store Information / Country')}}" stepKey="selectDefaultVariableForCountry"/> + <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableForCountry"/> + <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariable"/> + <wait time="2" stepKey="waitForLoad"/> + <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings"/> + <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/> + <click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/> + <fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/> + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAgain"/> + <amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPageRefresh"/> </test> </tests> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml index b19ab17193d12..a9cdaf75098d7 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml @@ -8,12 +8,17 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="EuropeanCountriesOptionActionGroup" extends="EuropeanCountriesOptionActionGroup"> + <actionGroup name="EuropeanCountriesSystemCheckBoxActionGroup"> <annotations> <description>check system value european country option value</description> </annotations> - <remove keyForRemoval="uncheckConfigSetting"/> + <amOnPage url="{{AdminConfigGeneralPage.url}}" stepKey="navigateToAdminStoreConfiguration"/> + <conditionalClick selector="{{CountriesFormSection.block}}" dependentSelector="{{CountriesFormSection.label}}" visible="false" stepKey="expand_panel"/> + <scrollTo selector="{{CountriesFormSection.label}}" stepKey="scrollToLabel" /> + <wait time="2" stepKey="waitForLoad"/> <checkOption selector="{{CountriesFormSection.useConfigSettings}}" stepKey="checkConfigSetting"/> + <wait time="2" stepKey="waitForPageLoad"/> + <click selector="{{CountriesFormSection.saveConfig}}" stepKey="clickSave"/> </actionGroup> </actionGroups> From 3bb5cad0c965657ee0bbdfa41f1bce3f55a6061f Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 17 Apr 2023 14:27:06 -0700 Subject: [PATCH 101/277] Can't use fragments for , or --- app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php | 2 +- .../Model/Resolver/Product/ProductFieldsSelector.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index c22c942114f3e..db80d5dd8e582 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -84,7 +84,7 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): * @param ResolveInfo $resolveInfo * @return array */ - public function getQueryData($query, $resolveInfo) + public function getQueryData(array $query, ResolveInfo $resolveInfo): array { $selectedFields = $fragmentFields = []; foreach ($query as $field) { diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index c79b172026364..d0092c87abad7 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -19,12 +19,12 @@ class ProductFieldsSelector /** * @var FieldTranslator */ - private $fieldTranslator; + private FieldTranslator $fieldTranslator; /** * @var AttributesJoiner */ - private $attributesJoiner; + private AttributesJoiner $attributesJoiner; /** * @param FieldTranslator $fieldTranslator From caea1c11cf17b8552ff0348087f00a7619af245f Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 17 Apr 2023 14:42:38 -0700 Subject: [PATCH 102/277] Can't use fragments for , or --- app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index db80d5dd8e582..4b2c7ecdd5f09 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -84,7 +84,7 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): * @param ResolveInfo $resolveInfo * @return array */ - public function getQueryData(array $query, ResolveInfo $resolveInfo): array + public function getQueryData($query, $resolveInfo): array { $selectedFields = $fragmentFields = []; foreach ($query as $field) { From 222746ab6511dcdcd709872cc3a0a976c5ec3b5d Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Tue, 18 Apr 2023 12:45:27 +0530 Subject: [PATCH 103/277] ACQE-3393: Added html in place of text --- .../AdminConfigureStoreInformationTest.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml index 46fa22f81d3f9..019b8fb7e67f6 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml @@ -59,40 +59,40 @@ <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> <argument name="contentType" value="PageBuilderTextContentType"/> </actionGroup> - <actionGroup ref="dragContentTypeToStage" stepKey="dragIntoStage"> - <argument name="contentType" value="PageBuilderTextContentType"/> + <actionGroup ref="dragContentTypeToStage" stepKey="dragToStage"> + <argument name="contentType" value="PageBuilderHtmlContentType"/> </actionGroup> <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> - <argument name="contentType" value="PageBuilderTextContentType"/> + <argument name="contentType" value="PageBuilderHtmlContentType"/> </actionGroup> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButton"/> + <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButton"/> <wait time="2" stepKey="waitForPageToLoadForToInsertButtonForStoreName"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Store Name')}}" stepKey="selectDefaultVariable"/> <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStoreName"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForStAds"/> <wait time="2" stepKey="waitForPageToLoadToSelectInsertVariableButtonForStAds"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableButtonForStAds"/> + <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableButtonForStAds"/> <wait time="2" stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStAds"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Street Address')}}" stepKey="selectDefaultVariableForStAds"/> <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStAds"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForStore"/> <wait time="2" stepKey="waitForPageToLoadForToInsertButtonForStore"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableForStore"/> + <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableForStore"/> <wait time="2" stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStore"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / City')}}" stepKey="selectDefaultVariableForStore"/> <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStore"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForCode"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCode"/> + <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCode"/> <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCode"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / ZIP/Postal Code')}}" stepKey="selectDefaultVariableForCode"/> <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableCode"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForState"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForState"/> + <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForState"/> <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForState"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Region/State')}}" stepKey="selectDefaultVariableForState"/> <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableForState"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForCountry"/> - <click selector="{{TextOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCountry"/> + <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCountry"/> <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCountry"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Country')}}" stepKey="selectDefaultVariableForCountry"/> <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableForCountry"/> @@ -104,5 +104,6 @@ <fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/> <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAgain"/> <amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPageRefresh"/> + <see userInput="New Store InformationAugsburger Strabe 41Berlin10789BerlinGermany" stepKey="seeCustomData" /> </test> </tests> From c8ba9693e7933f8d88199c81306b725bda2d02ba Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Tue, 18 Apr 2023 16:35:34 +0530 Subject: [PATCH 104/277] ACQE-4735: Added disable table rate method actiongroup --- ...ultipleAddressCheckoutWithTwoDifferentRatesTest.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml index 3164957cb19e7..116da4348e51b 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml @@ -28,6 +28,16 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!-- disable table rate meth0d --> + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> + <!-- Switch to Website scope --> + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView"> + <argument name="website" value="_defaultWebsite"/> + </actionGroup> + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="disableTableRatesShippingMethod"> + <argument name="status" value="0"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Stores > Configuration > Sales > Shipping Methods --> From 1efdc391bd1079e9fe7a1015e8ec91d7c5088bfb Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 17 Apr 2023 21:48:42 -0700 Subject: [PATCH 105/277] BUG#AC-6666:Can't use fragments for 'related_products', 'upsell_products' or 'crosssell_products' --- app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php | 6 +++--- .../Magento/GraphQl/Catalog/ProductFragmentTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 4b2c7ecdd5f09..a82b59f394c33 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -106,9 +106,9 @@ public function getQueryData($query, $resolveInfo): array $selectedFields[] = $field->name->value; } } - $data=[]; - $data['selectedFields']=$selectedFields; - $data['fragmentFields']=$fragmentFields; + $data = []; + $data['selectedFields'] = $selectedFields; + $data['fragmentFields'] = $fragmentFields; return $data; } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php index a11323045e8ca..ff932026c5ce2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductFragmentTest.php @@ -19,7 +19,7 @@ class ProductFragmentTest extends GraphQlAbstract * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @throws Exception */ - public function testSimpleProductNamedFragment() + public function testSimpleProductNamedFragment(): void { $sku = 'simple'; $name = 'Simple Product'; @@ -58,7 +58,7 @@ public function testSimpleProductNamedFragment() * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @throws Exception */ - public function testSimpleProductInlineFragment() + public function testSimpleProductInlineFragment(): void { $sku = 'simple'; $name = 'Simple Product'; From 125967eafa6e273701fc0e7ea949bc81f196384c Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Thu, 20 Apr 2023 08:45:44 +0530 Subject: [PATCH 106/277] AC-8385: MFTF Test Fix --- ...ontCaptchaOnOnepageCheckoutPyamentTest.xml | 11 +++++++ ...ckoutAsCustomerUsingDefaultAddressTest.xml | 8 +++++ ...utAsCustomerUsingNonDefaultAddressTest.xml | 8 +++++ ...ntCheckoutWithSpecialPriceProductsTest.xml | 6 ++++ ...refrontCustomerLoginDuringCheckoutTest.xml | 6 ++++ ...leDisableGuestCheckoutLoginActionGroup.xml | 28 +++++++++++++++++ .../Mftf/Page/AdminConfigCheckoutPage.xml | 13 ++++++++ .../Section/AdminSalesCheckoutSection.xml | 13 ++++++++ .../Mftf/Section/ConfigurationCheckTest.xml | 30 +++++++++++++++++++ .../Quote/Model/QuoteAddressValidator.php | 15 ++++++++-- ...tCreateOrderWithDifferentAddressesTest.xml | 8 +++++ 11 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.xml create mode 100644 app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml create mode 100644 app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml create mode 100644 app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml index 912e637dc534e..8a15a24baa6f5 100644 --- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml +++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml @@ -21,6 +21,11 @@ <group value="storefront_captcha_enabled"/> </annotations> <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> + <argument name="Enable" value="Yes"/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">20</field> @@ -62,6 +67,12 @@ <!-- Delete customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!-- Admin Login, Disable Config settings and Admin Logout --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> + <argument name="Enable" value="No"/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Reindex and flush cache --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml index 64f392d39edcb..b877d727d7969 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml @@ -20,6 +20,11 @@ <group value="mtf_migrated"/> </annotations> <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> + <argument name="Enable" value="Yes"/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">560</field> @@ -29,6 +34,9 @@ <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> </before> <after> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> + <argument name="Enable" value="No"/> + </actionGroup> <!-- Admin log out --> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml index f6db22cbccaa8..d8619a59da0ec 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml @@ -20,6 +20,11 @@ <group value="mtf_migrated"/> </annotations> <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> + <argument name="Enable" value="Yes"/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">560</field> @@ -29,6 +34,9 @@ <createData entity="Customer_DE_UK_US" stepKey="createCustomer"/> </before> <after> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> + <argument name="Enable" value="No"/> + </actionGroup> <!-- Admin log out --> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml index 1a85bb0bee1ee..30ce72594bb52 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml @@ -19,6 +19,9 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> + <argument name="Enable" value="Yes"/> + </actionGroup> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> <createData entity="defaultSimpleProduct" stepKey="simpleProduct"> <field key="price">10.00</field> @@ -101,6 +104,9 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> + <argument name="Enable" value="No"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml index eb76748a81c97..e5651891d4e00 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml @@ -24,6 +24,9 @@ <!-- Login as admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> + <argument name="Enable" value="Yes"/> + </actionGroup> </before> <after> <!-- Delete simple product --> @@ -41,6 +44,9 @@ </actionGroup> <!-- Logout admin --> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> + <argument name="Enable" value="No"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Storefront as Guest and create new account --> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.xml new file mode 100644 index 0000000000000..a2fd16a2efec5 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.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="AdminEnableDisableGuestCheckoutLoginActionGroup"> + <annotations> + <description>Goes to the 'Configuration' page for 'Admin'> Sales > . Enables / Disables 'Guest Checkout Login'. Clicks on the Save button.</description> + </annotations> + <arguments> + <argument name="Enable" type="string"/> + </arguments> + <amOnPage url="{{AdminConfigCheckoutPage.url('')}}" stepKey="navigateToSalesCheckoutPage"/> + <waitForPageLoad stepKey="waitForSalesCheckoutPageToLoad"/> + <conditionalClick selector="{{AdminConfigSection.collapsibleSectionByTitle('Checkout Options')}}" dependentSelector="{{AdminConfigSection.expandedSectionByTitle('Checkout Options')}}" visible="false" stepKey="expandCheckoutOptionSection" /> + <waitForElement selector="{{AdminConfigSection.expandedSectionByTitle('Checkout Options')}}" stepKey="waitOpenedSection"/> + <uncheckOption selector="{{AdminSalesCheckoutSection.chkUseSystemValueOptions('enable_guest_checkout_login')}}" stepKey="uncheckUseSystemValueForGuestCheckoutLogin"/> + <selectOption selector="{{AdminSalesCheckoutSection.selectCheckoutOptionsDropdown('enable_guest_checkout_login')}}" userInput="{{Enable}}" stepKey="selectYesNo"/> + <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> + <waitForPageLoad stepKey="waitForPageLoadPostSavingTheConfig"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml new file mode 100644 index 0000000000000..89700dfecc4f2 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.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="AdminConfigCheckoutPage" url="admin/system_config/edit/section/checkout/" area="admin" module="Magento_Config"> + <section name="SalesAdminCheckoutSection"/> + </page> +</pages> diff --git a/app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml new file mode 100644 index 0000000000000..9be013da544cc --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.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="AdminSalesCheckoutSection"> + <element name="chkUseSystemValueOptions" type="checkbox" selector="//input[@name='groups[options][fields][{{arg}}][inherit]' and @type='checkbox']" parameterized="true"/> + <element name="selectCheckoutOptionsDropdown" type="select" selector="//select[@name='groups[options][fields][{{arg}}][value]']" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml b/app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml new file mode 100644 index 0000000000000..c069b5d993020 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml @@ -0,0 +1,30 @@ +<?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="ConfigurationCheckTest"> + <annotations> + <stories value="Dynamic Media URL1"/> + <title value="Verify that Allow Dynamic Media URLs setting is removed from configuration page1"/> + <description value="Verify that Allow Dynamic Media URLs setting is removed from configuration page1"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-31781"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + <after> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPage" /> + <waitForPageLoad stepKey="waitForPageLoad"/> + <conditionalClick stepKey="expandStorefrontTab" selector="{{CatalogSection.storefront}}" dependentSelector="{{CatalogSection.CheckIfTabExpand}}" visible="true" /> + <dontSee stepKey="dontSeeDynamicMediaURLsSetting" userInput="Allow Dynamic Media URLs"/> + </test> +</tests> diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index 188555174a05e..dd321b4df5ad1 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -10,6 +10,7 @@ use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\Session; +use Magento\Framework\App\DeploymentConfig; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; @@ -23,6 +24,8 @@ */ class QuoteAddressValidator { + private const XML_CHECKOUT_CONFIG_VALUE = 'checkout/async'; + /** * @var AddressRepositoryInterface */ @@ -40,21 +43,29 @@ class QuoteAddressValidator */ protected Session $customerSession; + /** + * @var DeploymentConfig + */ + private DeploymentConfig $deploymentConfig; + /** * Constructs a quote shipping address validator service object. * * @param AddressRepositoryInterface $addressRepository * @param CustomerRepositoryInterface $customerRepository Customer repository. * @param Session $customerSession + * @param DeploymentConfig $deploymentConfig */ public function __construct( AddressRepositoryInterface $addressRepository, CustomerRepositoryInterface $customerRepository, - Session $customerSession + Session $customerSession, + DeploymentConfig $deploymentConfig ) { $this->addressRepository = $addressRepository; $this->customerRepository = $customerRepository; $this->customerSession = $customerSession; + $this->deploymentConfig = $deploymentConfig; } /** @@ -154,7 +165,7 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI */ public function validateForCart(CartInterface $cart, AddressInterface $address): void { - if ($cart->getCustomerIsGuest()) { + if ((!$this->deploymentConfig->get(self::XML_CHECKOUT_CONFIG_VALUE)) && $cart->getCustomerIsGuest()) { $this->doValidateForGuestQuoteAddress($address, $cart); } $this->doValidate($address, $cart->getCustomerIsGuest() ? null : (int) $cart->getCustomer()->getId()); diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml index bf45d3305dcfd..942d85bbd4864 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml @@ -15,6 +15,11 @@ <group value="sales"/> </annotations> <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> + <argument name="Enable" value="Yes"/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> <createData entity="Customer_UK_US" stepKey="createCustomer"/> </before> @@ -22,6 +27,9 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCreateCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> + <argument name="Enable" value="No"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> </after> From e2d8960a3411af610cb7ed0a7ebe6a9a66e36678 Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Thu, 20 Apr 2023 09:56:56 +0530 Subject: [PATCH 107/277] ACQE-3393: removed hard code wait --- .../AdminConfigureStoreInformationTest.xml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml index 019b8fb7e67f6..b06bb0341d517 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigureStoreInformationTest.xml @@ -66,38 +66,38 @@ <argument name="contentType" value="PageBuilderHtmlContentType"/> </actionGroup> <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableButton"/> - <wait time="2" stepKey="waitForPageToLoadForToInsertButtonForStoreName"/> + <waitForPageLoad stepKey="waitForPageToLoadForToInsertButtonForStoreName"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Store Name')}}" stepKey="selectDefaultVariable"/> - <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStoreName"/> + <waitForPageLoad stepKey="waitForPageToLoadForToSelectDefaultVariableStoreName"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForStAds"/> - <wait time="2" stepKey="waitForPageToLoadToSelectInsertVariableButtonForStAds"/> + <waitForPageLoad stepKey="waitForPageToLoadToSelectInsertVariableButtonForStAds"/> <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableButtonForStAds"/> - <wait time="2" stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStAds"/> + <waitForPageLoad stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStAds"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Street Address')}}" stepKey="selectDefaultVariableForStAds"/> - <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStAds"/> + <waitForPageLoad stepKey="waitForPageToLoadForToSelectDefaultVariableStAds"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForStore"/> - <wait time="2" stepKey="waitForPageToLoadForToInsertButtonForStore"/> + <waitForPageLoad stepKey="waitForPageToLoadForToInsertButtonForStore"/> <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="againClickInsertVariableForStore"/> - <wait time="2" stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStore"/> + <waitForPageLoad stepKey="againWaitForPageToLoadToSelectInsertVariableButtonForStore"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / City')}}" stepKey="selectDefaultVariableForStore"/> - <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableStore"/> + <waitForPageLoad stepKey="waitForPageToLoadForToSelectDefaultVariableStore"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForCode"/> <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCode"/> - <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCode"/> + <waitForPageLoad stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCode"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / ZIP/Postal Code')}}" stepKey="selectDefaultVariableForCode"/> - <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableCode"/> + <waitForPageLoad stepKey="waitForPageToLoadForToSelectDefaultVariableCode"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForState"/> <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForState"/> - <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForState"/> + <waitForPageLoad stepKey="WaitForPageToLoadToSelectInsertVariableButtonForState"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Region/State')}}" stepKey="selectDefaultVariableForState"/> - <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableForState"/> + <waitForPageLoad stepKey="waitForPageToLoadForToSelectDefaultVariableForState"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariableForCountry"/> <click selector="{{HtmlOnConfiguration.insertVariableButton}}" stepKey="clickInsertVariableAgainForCountry"/> - <wait time="2" stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCountry"/> + <waitForPageLoad stepKey="WaitForPageToLoadToSelectInsertVariableButtonForCountry"/> <click selector="{{VariableSection.VariableRadio('General / Store Information / Country')}}" stepKey="selectDefaultVariableForCountry"/> - <wait time="2" stepKey="waitForPageToLoadForToSelectDefaultVariableForCountry"/> + <waitForPageLoad stepKey="waitForPageToLoadForToSelectDefaultVariableForCountry"/> <click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariable"/> - <wait time="2" stepKey="waitForLoad"/> + <waitForPageLoad stepKey="waitForLoad"/> <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings"/> <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/> <click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/> From 6d790159bf7e006f650d7cb647d270eb35814455 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 20 Apr 2023 11:32:23 +0530 Subject: [PATCH 108/277] ACQE-4774 | PR Feedback --- .../testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index da279101ba96f..34df1deb4ff35 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -244,7 +244,7 @@ public function testCustomerWithTwoNewsLetterSubscriptions() * @return void * @throws \Magento\Framework\Exception\LocalizedException */ - public function testCreateAccountWithNewsLetterSubscription() :void + public function testCreateAccountWithNewsLetterSubscription(): void { $objectManager = Bootstrap::getObjectManager(); /** @var \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerFactory */ @@ -259,6 +259,7 @@ public function testCreateAccountWithNewsLetterSubscription() :void $this->accountManagement->createAccount($customerDataObject, '123123qW'); $message = $this->transportBuilderMock->getSentMessage(); + $this->assertNotNull($message); $this->assertEquals('Welcome to Main Website Store', $message->getSubject()); $this->assertStringContainsString( 'John', @@ -289,6 +290,7 @@ public function testCreateAccountWithNewsLetterSubscription() :void $message = $this->transportBuilderMock->getSentMessage(); + $this->assertNotNull($message); $this->assertStringContainsString( $subscriber->getConfirmationLink(), $message->getBody()->getParts()[0]->getRawContent() From fe241ab281ebdb86e267dadb8dbe8e9080408782 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 20 Apr 2023 11:36:25 +0530 Subject: [PATCH 109/277] ACQE-4750 | PR Feedback --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 3 ++- 1 file changed, 2 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 52250d41b34e3..fe06f801f7c02 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -98,13 +98,14 @@ private function getResetPasswordUri(EmailMessage $message): string /** * Test admin email notification after password change + * * @throws LocalizedException * @return void */ #[ DataFixture(UserDataFixture::class, ['role_id' => 1], 'user') ] - public function testAdminEmailNotificationAfterPasswordChange() :void + public function testAdminEmailNotificationAfterPasswordChange(): void { // Load admin user $user = $this->fixtures->get('user'); From 6fccd5cbf1b8de6f8ac7ba305cd1b9af00ace57d Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Thu, 20 Apr 2023 12:27:59 +0530 Subject: [PATCH 110/277] AC-8385: MFTF Test Fix --- .../Magento/GraphQl/Customer/IsEmailAvailableTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php index 750d9e69b6461..b683b4bd521d6 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/IsEmailAvailableTest.php @@ -20,14 +20,14 @@ class IsEmailAvailableTest extends GraphQlAbstract { /** - * @var ScopeConfigInterface + * @var ScopeConfigInterface|null */ - private ScopeConfigInterface $scopeConfig; + private ?ScopeConfigInterface $scopeConfig; /** - * @var string + * @var string|null */ - private string $storeId; + private ?string $storeId; public function setUp(): void { From 24e60141c3a23085f95c4d5232df3bf6a4a3159c Mon Sep 17 00:00:00 2001 From: Aparna Sreekumar <glo80326@adobe.com> Date: Tue, 18 Apr 2023 17:44:36 +0530 Subject: [PATCH 111/277] BUG#AC-8227: Tax Class set to None when creating new configurable variations in multi store mode --- .../Model/Product/VariationHandler.php | 11 +++++++---- .../Model/Product/VariationHandlerTest.php | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php b/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php index df2a9707f18d5..36b5c204897c0 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php @@ -7,11 +7,11 @@ namespace Magento\ConfigurableProduct\Model\Product; +use Magento\Catalog\Model\Product\Attribute\Source\Status; use Magento\Catalog\Model\Product\Type as ProductType; use Magento\Framework\Exception\LocalizedException; /** - * Variation Handler * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @api * @since 100.0.2 @@ -52,6 +52,7 @@ class VariationHandler /** * @var \Magento\CatalogInventory\Api\StockConfigurationInterface * @deprecated 100.1.0 + * @see MAGETWO-71174 */ protected $stockConfiguration; @@ -120,6 +121,7 @@ public function generateSimpleProducts($parentProduct, $productsData) * Prepare attribute set comprising all selected configurable attributes * * @deprecated 100.1.0 + * @see MAGETWO-71174 * @param \Magento\Catalog\Model\Product $product * @return void */ @@ -209,9 +211,10 @@ protected function fillSimpleProductData( } $postData = $this->processMediaGallery($product, $postData); - $postData['status'] = isset($postData['status']) - ? $postData['status'] - : \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED; + $postData['status'] = $postData['status'] ?? Status::STATUS_ENABLED; + $defaultTaxClassId = isset($this->attributes['tax_class_id']) ? + $this->attributes['tax_class_id']->getDefaultValue() : null; + $postData['tax_class_id'] = $postData['tax_class_id'] ?? $parentProduct->getTaxClassId() ?? $defaultTaxClassId; $product->addData( $postData )->setWebsiteIds( diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php index beab52c142402..655576491c533 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php @@ -73,6 +73,7 @@ public function testGenerateSimpleProducts(array $productsData): void ->setSmallImage('some_test_image.jpg') ->setThumbnail('some_test_image.jpg') ->setSwatchImage('some_test_image.jpg') + ->setTaxClassId(2) ->setNewVariationsAttributeSetId($this->product->getDefaultAttributeSetId()); $generatedProducts = $this->variationHandler->generateSimpleProducts($this->product, $productsData); $this->assertCount(3, $generatedProducts); @@ -88,6 +89,7 @@ public function testGenerateSimpleProducts(array $productsData): void $this->assertNull($product->getSmallImage()); $this->assertNull($product->getThumbnail()); $this->assertNull($product->getSwatchImage()); + $this->assertEquals(2, $product->getTaxClassId()); } } From 9f74ef5bd879258468988b570a7d05cfd768b39b Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Fri, 21 Apr 2023 15:22:31 +0530 Subject: [PATCH 112/277] AC-4455 Order Data Grid displays Purchase Date in correct format --- .../Mftf/Section/LocaleOptionsSection.xml | 6 + ...TimeZoneForDifferentWebsiteActionGroup.xml | 32 +++ .../Sales/Test/Mftf/Test/SampleOneTest.xml | 187 ++++++++++++++++++ 3 files changed, 225 insertions(+) create mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml diff --git a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml index 5aaefc383f413..0d40a6a4005a1 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml @@ -16,5 +16,11 @@ <element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/> <element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/> <element name="defaultLocale" type="checkbox" selector="#general_locale_code_inherit"/> + <element name="checkIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/> + <element name="timeZoneDropdown" type="select" selector="//select[@id='general_locale_timezone']"/> + <element name="changeStoreConfigButton" type="button" selector="//button[@id='store-change-button']"/> + <element name="changeStoreConfigToSpecificWebsite" type="select" selector="//a[contains(text(),'{{var}}')]" parameterized="true"/> + <element name="changeWebsiteConfirmButton" type="button" selector="//button[@class='action-primary action-accept']/span"/> + <element name="checkboxTimeZone" type="checkbox" selector="//input[@id='general_locale_timezone_inherit']"/> </section> </sections> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml new file mode 100644 index 0000000000000..c9452843754f3 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.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="AdminChangeTimeZoneForDifferentWebsiteActionGroup"> + <annotations> + <description>set the time zone for different website</description> + </annotations> + <arguments> + <argument name="websiteName" type="string" defaultValue="{{SimpleProduct.sku}}"/> + <argument name="timeZoneName" type="string"/> + </arguments> + <amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="navigateToLocaleConfigurationPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <click selector="{{LocaleOptionsSection.changeStoreConfigButton}}" stepKey="changeStoreButton"/> + <wait time="10" stepKey="waitForStoreOption"/> + <click selector="{{LocaleOptionsSection.changeStoreConfigToSpecificWebsite(websiteName)}}" stepKey="selectNewWebsite"/> + <wait time="10" stepKey="waitForWebsiteChange"/> + <!-- Accept the current popup visible on the page. --> + <click selector="{{LocaleOptionsSection.changeWebsiteConfirmButton}}" stepKey="confirmModal"/> + <wait time="10" stepKey="waitForPageLoad"/> + <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.CheckIfTabExpand}}" visible="true"/> + <click selector="{{LocaleOptionsSection.checkboxTimeZone}}" stepKey="unCheckCheckbox"/> + <waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/> + <selectOption userInput="{{timeZoneName}}" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultOption"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml new file mode 100644 index 0000000000000..19e251597dc8f --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml @@ -0,0 +1,187 @@ +<?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="SampleOneTest"> + <annotations> + <title value="Order Data Grid displays Purchase Date in correct format"/> + <description value="Order Data Grid displays Purchase Date in correct format"/> + <testCaseId value="AC-4455"/> + <severity value="MAJOR"/> + </annotations> + <before> + <!-- Set Store Code To Urls --> + <magentoCLI command="config:set {{StorefrontEnableAddStoreCodeToUrls.path}} {{StorefrontEnableAddStoreCodeToUrls.value}}" stepKey="setAddStoreCodeToUrlsToYes"/> + <!-- Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!--Create website--> + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite"> + <argument name="newWebsiteName" value="{{secondCustomWebsite.name}}"/> + <argument name="websiteCode" value="{{secondCustomWebsite.code}}"/> + </actionGroup> + <!-- Create second store --> + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStoreGroup"> + <argument name="website" value="{{secondCustomWebsite.name}}"/> + <argument name="storeGroupName" value="{{SecondStoreGroupUnique.name}}"/> + <argument name="storeGroupCode" value="{{SecondStoreGroupUnique.code}}"/> + </actionGroup> + <!-- Create second store view --> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView"> + <argument name="StoreGroup" value="SecondStoreGroupUnique"/> + <argument name="customStore" value="SecondStoreUnique"/> + </actionGroup> + <magentoCron groups="index" stepKey="reindexAllIndexes"/> + <!-- Change time zone for second website--> + <actionGroup ref="AdminChangeTimeZoneForDifferentWebsiteActionGroup" stepKey="openConfigPage"> + <argument name="websiteName" value="{{secondCustomWebsite.name}}"/> + <argument name="timeZoneName" value="Hawaii-Aleutian Standard Time (America/Adak)"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfiguration"/> + <!-- Change time zone for Main website--> + <actionGroup ref="AdminChangeTimeZoneForDifferentWebsiteActionGroup" stepKey="openConfigPageSecondTime"> + <argument name="websiteName" value="Main Website"/> + <argument name="timeZoneName" value="Taipei Standard Time (Asia/Taipei)"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigurationSecondTime"/> + <!-- Create category and simple product --> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + <field key="price">10</field> + </createData> + <!-- Open product page and assign grouped project to second website --> + <actionGroup ref="FilterAndSelectProductActionGroup" stepKey="openAdminProductPage"> + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> + </actionGroup> + <actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="assignProductToSecondWebsite"> + <argument name="website" value="{{secondCustomWebsite.name}}"/> + </actionGroup> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <!--Go to Storefront as Customer--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> + <argument name="Customer" value="$$createCustomer$$" /> + </actionGroup> + </before> + + <after> + <!-- Disabled Store URLs --> + <magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="setAddStoreCodeToUrlsToNo"/> + <!-- Delete Category --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <!-- Delete simple product --> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <!-- Delete first customer --> + <deleteData createDataKey="createCustomer" stepKey="deleteFirstCustomer"/> + <!-- Delete second customer --> + <deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/> + <amOnPage url="{{AdminDashboardPage.url}}" stepKey="gotoOnDashboardPage"/> + <waitForPageLoad stepKey="waitForDashboardPageToLoad"/> + <!--set main website as default--> + <actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setMainWebsiteAsDefault"> + <argument name="websiteName" value="Main Website"/> + </actionGroup> + <!-- Delete second website --> + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> + <argument name="websiteName" value="{{secondCustomWebsite.name}}"/> + </actionGroup> + <magentoCron groups="index" stepKey="reindex"/> + <!--reset prouct grid filter--> + <actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridFilter"/> + <!-- Admin logout --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + </after> + <!-- Go to product page --> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForCatalogPageLoad"/> + <!-- Add Product to Shopping Cart --> + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + <!-- Go to Checkout --> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMiniCart"/> + <actionGroup ref="StorefrontSelectFirstShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> + <comment userInput="Adding the comment to replace waitForLoadingMask2 action for preserving Backward Compatibility" stepKey="waitForLoadingMask2"/> + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> + <!-- Checkout select Check/Money Order payment --> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/> + <!-- Click Place Order button --> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> + <!-- capture date at time of Placeing Order --> + <generateDate date="+2 hour" format="M j, Y" stepKey="generateDateAtFirstOrderTime"/> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabFirstOrderNumber"/> + <amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/> + <waitForPageLoad stepKey="waitForDashboardPageLoad"/> + <!--set second website as default--> + <actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setSecondWebsiteAsDefault"> + <argument name="websiteName" value="{{secondCustomWebsite.name}}"/> + </actionGroup> + <!-- create second Customer--> + <createData entity="Simple_US_Customer_CA" stepKey="createSecondCustomer"/> + <!--Go to Storefront as Customer--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="secondCustomerLogin"> + <argument name="Customer" value="$$createSecondCustomer$$" /> + </actionGroup> + <!-- Go to product page --> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPageSecondTime"/> + <waitForPageLoad stepKey="waitForCatalogPageLoadSecondTime"/> + <!-- Add Product to Shopping Cart --> + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPageSecondTime"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + <!-- Go to Checkout --> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMiniCartSecondTime"/> + <actionGroup ref="StorefrontSelectFirstShippingMethodActionGroup" stepKey="selectFlatRateShippingMethodSecondTime"/> + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNextSecondTime"/> + <!-- Checkout select Check/Money Order payment --> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPaymentSecondTime"/> + <!-- Click Place Order button --> + <wait time="75" stepKey="waitBeforePlaceOrder"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrderSecondTime"/> + <!-- capture date at time of Placeing Order --> + <generateDate date="+2 hour" format="M j, Y" stepKey="generateDateAtSecondOrderTime"/> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabSecondOrderNumber"/> + <!-- Go to admin and check order status --> + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/> + <actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchForFirstOrder"> + <argument name="keyword" value="{$grabFirstOrderNumber}"/> + </actionGroup> + <!--Get date from "Purchase Date" column --> + <grabTextFrom selector="{{AdminOrdersGridSection.gridCell('1','Purchase Date')}}" stepKey="grabPurchaseDateForFirstOrderInDefaultLocale"/> + <!--Get date and time in default locale (US)--> + <executeJS function="return (new Date('{$grabPurchaseDateForFirstOrderInDefaultLocale}').toLocaleDateString('en-US',{month: 'short', day: 'numeric', year: 'numeric'} ))" stepKey="getDateMonthYearNameForFirstOrderInUS"/> + <!--Checking oder placing Date with default "Interface Locale"--> + <assertStringContainsString stepKey="checkingFirstOrderDateWithPurchaseDate"> + <expectedResult type="variable">getDateMonthYearNameForFirstOrderInUS</expectedResult> + <actualResult type="variable">grabPurchaseDateForFirstOrderInDefaultLocale</actualResult> + </assertStringContainsString> + <!--compare date of order with date of purchase--> + <assertStringContainsString stepKey="checkingFirstOrderDateWithDefaultInterfaceLocale1"> + <expectedResult type="variable">generateDateAtFirstOrderTime</expectedResult> + <actualResult type="variable">grabPurchaseDateForFirstOrderInDefaultLocale</actualResult> + </assertStringContainsString> + <actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchForSecondOrder"> + <argument name="keyword" value="{$grabSecondOrderNumber}"/> + </actionGroup> + <!--Get date from "Purchase Date" column--> + <grabTextFrom selector="{{AdminOrdersGridSection.gridCell('1','Purchase Date')}}" stepKey="grabPurchaseDateForSecondOrderInDefaultLocale"/> + <!--Get date and time in default locale (US)--> + <executeJS function="return (new Date('{$grabPurchaseDateForSecondOrderInDefaultLocale}').toLocaleDateString('en-US',{month: 'short', day: 'numeric', year: 'numeric'} ))" stepKey="getDateMonthYearNameForSecondOrderInUS"/> + <!--Checking Purchase Date with default "Interface Locale"--> + <assertStringContainsString stepKey="checkingSecondOrderDateWithDefaultInterfaceLocale"> + <expectedResult type="variable">getDateMonthYearNameForSecondOrderInUS</expectedResult> + <actualResult type="variable">grabPurchaseDateForSecondOrderInDefaultLocale</actualResult> + </assertStringContainsString> + <!--compare date of order with date of purchase--> + <assertStringContainsString stepKey="checkingSecondOrderDateWithPurchaseDate"> + <expectedResult type="variable">generateDateAtSecondOrderTime</expectedResult> + <actualResult type="variable">grabPurchaseDateForFirstOrderInDefaultLocale</actualResult> + </assertStringContainsString> + </test> +</tests> From 808fe8fb8a77ad9365ba91c558d60e8f7ed15655 Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Mon, 24 Apr 2023 11:03:35 +0530 Subject: [PATCH 113/277] ACQE-3393 : reused existing actiongroup --- .../EuropeanCountriesSystemCheckBoxActionGroup.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml index a9cdaf75098d7..64245ae127597 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml @@ -13,12 +13,7 @@ <description>check system value european country option value</description> </annotations> - <amOnPage url="{{AdminConfigGeneralPage.url}}" stepKey="navigateToAdminStoreConfiguration"/> - <conditionalClick selector="{{CountriesFormSection.block}}" dependentSelector="{{CountriesFormSection.label}}" visible="false" stepKey="expand_panel"/> - <scrollTo selector="{{CountriesFormSection.label}}" stepKey="scrollToLabel" /> - <wait time="2" stepKey="waitForLoad"/> - <checkOption selector="{{CountriesFormSection.useConfigSettings}}" stepKey="checkConfigSetting"/> - <wait time="2" stepKey="waitForPageLoad"/> - <click selector="{{CountriesFormSection.saveConfig}}" stepKey="clickSave"/> + <remove keyForRemoval="uncheckConfigSetting"/> + <checkOption selector="{{CountriesFormSection.useConfigSettings}}" stepKey="checkConfigSetting" after="waitForLoad"/> </actionGroup> </actionGroups> From 02e778df578c9bfd60b605a3cea61fd464321715 Mon Sep 17 00:00:00 2001 From: Rithica <rithica@BLR1-LHP-N73295.local> Date: Mon, 24 Apr 2023 11:54:29 +0530 Subject: [PATCH 114/277] AC-5727 Simple products are displayed after search --- .../AdminProductFormSection.xml | 2 + .../StorefrontCategorySidebarSection.xml | 4 + ...atchToProductWithTwoOptionsActionGroup.xml | 46 ++++++ .../AddVisualSwatchActionGroup.xml | 57 +++++++ .../Mftf/Section/AdminManageSwatchSection.xml | 2 + ...mpleProductwithTextandVisualSwatchTest.xml | 146 ++++++++++++++++++ 6 files changed, 257 insertions(+) create mode 100644 app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddTextSwatchToProductWithTwoOptionsActionGroup.xml create mode 100644 app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml create mode 100644 app/code/Magento/Swatches/Test/Mftf/Test/AdminSimpleProductwithTextandVisualSwatchTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml index 0a3c67bc00d5b..82d5365c723dd 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml @@ -83,5 +83,7 @@ <element name="newAddedAttributeValue" type="text" selector="//option[contains(@data-title,'{{attributeValue}}')]" parameterized="true"/> <element name="country_Of_Manufacture" type="select" selector="//td[contains(text(), 'country_of_manufacture')]"/> <element name="textArea" type="text" selector="//textarea[@name='product[test_custom_attribute]']" timeout="30"/> + <element name="attributeRequiredInput" type="input" selector="//input[contains(@name, 'product[{{attributeCode}}]')]" parameterized="true"/> + <element name="saveCategory" type="button" selector="//button[@data-action='close-advanced-select']" timeout="30"/> </section> </sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml index 26a5452ee018c..6edef36fd98f4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml @@ -27,5 +27,9 @@ <element name="expandPriceLayeredNavigationButton" type="button" selector="//div[@class='filter-options-title'][text()='Price']"/> <element name="seeLayeredNavigationFirstPriceRange" type="button" selector="//a//span[@class='price' and text()='${{minPrice}}']/..//span[@class='price' and text()='${{maxPrice}}']/..//span[@class='count' and text()=({{count}})]" parameterized="true"/> <element name="seeLayeredNavigationSecondPriceRange" type="button" selector="//a//span[@class='price' and text()='${{minPrice2}}']/../..//a[text()='{{maxPrice2}}']/..//span[@class='count' and text()=({{count}})]" parameterized="true"/> + <element name="seeLayeredNavigationCategoryTextSwatch" type="text" selector="//div[@class='filter-options-title' and contains(text(),'TextSwatch')]"/> + <element name="seeLayeredNavigationCategoryVisualSwatch" type="text" selector="//div[@class='filter-options-title' and contains(text(),'attribute')]"/> + <element name="seeTextSwatchOption" type="text" selector="//div[@class='swatch-option text ' and contains(text(),'textSwatchOption1')]"/> + <element name="seeVisualSwatchOption" type="text" selector="//div[@class='swatch-option image ']/..//div[@data-option-label='visualSwatchOption2']"/> </section> </sections> diff --git a/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddTextSwatchToProductWithTwoOptionsActionGroup.xml b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddTextSwatchToProductWithTwoOptionsActionGroup.xml new file mode 100644 index 0000000000000..97d905e0b3b44 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddTextSwatchToProductWithTwoOptionsActionGroup.xml @@ -0,0 +1,46 @@ +<?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="AddTextSwatchToProductWithTwoOptionsActionGroup"> + <annotations> + <description>Add text swatch property attribute.</description> + </annotations> + <arguments> + <argument name="attributeName" defaultValue="{{textSwatchAttribute.default_label}}" type="string"/> + <argument name="attributeCode" defaultValue="{{textSwatchAttribute.attribute_code}}" type="string"/> + <argument name="option1" defaultValue="textSwatchOption1" type="string"/> + <argument name="option2" defaultValue="textSwatchOption2" type="string"/> + <argument name="usedInProductListing" defaultValue="No" type="string"/> + </arguments> + <!--Begin creating text swatch attribute--> + <amOnPage url="{{ProductAttributePage.url}}" stepKey="goToNewProductAttributePage"/> + <waitForPageLoad stepKey="waitForNewProductAttributePage"/> + <fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{attributeName}}" stepKey="fillDefaultLabel"/> + <selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="{{textSwatchAttribute.input_type}}" stepKey="selectInputType"/> + <click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch1"/> + <fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('0')}}" userInput="{{option1}}" stepKey="fillSwatch1"/> + <fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('0')}}" userInput="{{option1}}" stepKey="fillSwatch1Description"/> + <click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch2"/> + <fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('1')}}" userInput="{{option2}}" stepKey="fillSwatch2"/> + <fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('1')}}" userInput="{{option2}}" stepKey="fillSwatch2Description"/> + <click selector="{{AttributePropertiesSection.AdvancedProperties}}" stepKey="expandAdvancedProperties"/> + <selectOption selector="{{AttributePropertiesSection.Scope}}" userInput="1" stepKey="selectGlobalScope"/> + <fillField selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attributeCode}}" stepKey="fillAttributeCodeField"/> + <scrollToTopOfPage stepKey="scrollToTabs"/> + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/> + <waitForElementVisible selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" stepKey="waitForTabSwitch"/> + <!-- Set Use In Layered Navigation --> + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontProperties"/> + <selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="1" stepKey="selectUseInLayeredNavigation"/> + <selectOption selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" userInput="{{usedInProductListing}}" stepKey="useInProductListing"/> + <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSave"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml new file mode 100644 index 0000000000000..e157bd873f9e7 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml @@ -0,0 +1,57 @@ +<?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="AddVisualSwatchActionGroup"> + <annotations> + <description>Add visual image swatch property attribute.</description> + </annotations> + + <!-- Begin creating a new product attribute of type "Image Swatch" --> + <amOnPage url="{{ProductAttributePage.url}}" stepKey="goToNewProductAttributePage"/> + <waitForPageLoad stepKey="waitForAttributePageLoad"/> + <fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillDefaultLabel"/> + <!-- Select visual swatch --> + <selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="swatch_visual" stepKey="selectInputType"/> + <!-- This hack is because the same <input type="file"> is re-purposed used for all uploads. --> + <executeJS function="HTMLInputElement.prototype.click = function() { if(this.type !== 'file') HTMLElement.prototype.click.call(this); };" stepKey="disableClick"/> + <!-- Set swatch image #1 --> + <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch1"/> + <executeJS function="jQuery('#swatch_window_option_option_0').click()" stepKey="clickSwatch1"/> + <click selector="{{AdminManageSwatchSection.nthUploadFile('1')}}" stepKey="clickUploadFile1"/> + <attachFile selector="input[name='datafile']" userInput="adobe-thumb.jpg" stepKey="attachFile1"/> + <waitForElementNotVisible selector="{{AdminManageSwatchSection.swatchWindowUnavailable('0')}}" stepKey="waitForImageUploaded1"/> + <fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="visualSwatchOption1" stepKey="fillAdmin1"/> + <fillField selector="{{AdminManageSwatchSection.visualSwatchDefaultStoreViewBox('0')}}" userInput="visualSwatchOption1" stepKey="fillSwatchDefaultStoreViewBox1"/> + <!-- Set swatch image #2 --> + <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> + <executeJS function="jQuery('#swatch_window_option_option_1').click()" stepKey="clickSwatch2"/> + <click selector="{{AdminManageSwatchSection.nthUploadFile('2')}}" stepKey="clickUploadFile2"/> + <attachFile selector="input[name='datafile']" userInput="adobe-small.jpg" stepKey="attachFile2"/> + <waitForElementNotVisible selector="{{AdminManageSwatchSection.swatchWindowUnavailable('1')}}" stepKey="waitForImageUploaded2"/> + <fillField selector="{{AdminManageSwatchSection.adminInputByIndex('1')}}" userInput="visualSwatchOption2" stepKey="fillAdmin2"/> + <fillField selector="{{AdminManageSwatchSection.visualSwatchDefaultStoreViewBox('1')}}" userInput="visualSwatchOption2" stepKey="fillSwatchDefaultStoreViewBox2"/> + <click selector="{{AdminManageSwatchSection.swatchWindow('1')}}" stepKey="clicksWatchWindow2"/> + <!-- Set scope --> + <click selector="{{AttributePropertiesSection.AdvancedProperties}}" stepKey="expandAdvancedProperties"/> + <selectOption selector="{{AttributePropertiesSection.Scope}}" userInput="1" stepKey="selectGlobalScope"/> + <scrollToTopOfPage stepKey="scrollToTabs"/> + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/> + <waitForElementVisible selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" stepKey="waitForTabSwitch"/> + <selectOption selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" userInput="Yes" stepKey="useInProductListing"/> + <!-- Set Use In Layered Navigation --> + <scrollToTopOfPage stepKey="scrollToTop2"/> + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontProperties"/> + <selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="1" stepKey="selectUseInLayeredNavigation"/> + <!-- Save the new product attribute --> + <click selector="{{AttributePropertiesSection.Save}}" stepKey="clickSaveAndEdit"/> + <wait stepKey="waitToLoad" time="3"/> + <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="waitForSuccess"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index ce50dd0132101..fbf3662875697 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -31,5 +31,7 @@ <element name="nthDelete" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) button.delete-option" parameterized="true"/> <element name="deleteBtn" type="button" selector="#manage-options-panel:nth-of-type({{var}}) button.delete-option" parameterized="true"/> <element name="manageSwatchSection" type="block" selector='//legend/span[contains(text(),"Manage Swatch (Values of Your Attribute)")]'/> + <element name="visualSwatchDefaultStoreViewBox" type="input" selector="input[name='optionvisual[value][option_{{index}}][1]']" parameterized="true"/> + </section> </sections> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSimpleProductwithTextandVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSimpleProductwithTextandVisualSwatchTest.xml new file mode 100644 index 0000000000000..f5ada80de18a5 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSimpleProductwithTextandVisualSwatchTest.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="AdminSimpleProductwithTextandVisualSwatchTest"> + <annotations> + <features value="Swatches"/> + <stories value="Create simple product and configure visual and text swatches"/> + <title value="Admin can create simple product with text and visual swatches"/> + <description value="Admin can create simple product with text and visual swatches"/> + <severity value="CRITICAL"/> + <testCaseId value="AC-5727"/> + </annotations> + <before> + <!-- Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!--Create text and visual swatch attribute--> + <actionGroup ref="AddTextSwatchToProductWithTwoOptionsActionGroup" stepKey="createTextSwatch"/> + <actionGroup ref="AddVisualSwatchActionGroup" stepKey="createVisualSwatch"/> + <!--Assign text swatch 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="{{textSwatchAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/> + <!--Assign visual swatch attribute to the Default set--> + <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage1"/> + <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet1"/> + <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup1"> + <argument name="group" value="Product Details"/> + <argument name="attribute" value="{{ProductAttributeFrontendLabel.label}}"/> + </actionGroup> + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet1"/> + <!--Create category --> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <!--Create product and fill new text swatch 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> + <!-- Add text swatch product to category --> + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/> + <click selector="{{AdminProductFormSection.saveCategory}}" stepKey="saveCategory"/> + <scrollToTopOfPage stepKey="scrollToTop0"/> + <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(textSwatchAttribute.attribute_code)}}" userInput="textSwatchOption1" stepKey="fillTheAttributeRequiredInputField"/> + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <!-- Create product and fill new visual swatch attribute field--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex1"/> + <waitForPageLoad stepKey="waitForProductIndexPage1"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct1"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm1"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + <!-- Add visual swatch product to category --> + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory1"/> + <click selector="{{AdminProductFormSection.saveCategory}}" stepKey="saveCategory1"/> + <scrollToTopOfPage stepKey="scrollToTop1"/> + <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}" userInput="visualSwatchOption2" stepKey="fillTheAttributeRequiredInputField1"/> + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton1"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex1"> + <argument name="indices" value=""/> + </actionGroup> + </before> + <after> + <!-- Delete text and visual swatch attributes --> + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid0"> + <argument name="productAttributeCode" value="{{textSwatchAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode0"> + <argument name="productAttributeCode" value="{{textSwatchAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess0"/> + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid1"> + <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/> + </actionGroup> + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode1"> + <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/> + </actionGroup> + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess1"/> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> + <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/> + <!-- Delete category --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <!-- Delete product --> + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/> + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex2"> + <argument name="indices" value=""/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <!--Assert that attribute values present in layered navigation --> + <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad"/> + <click selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryTextSwatch}}" stepKey="clickTextSwatch"/> + <click selector="{{StorefrontCategorySidebarSection.seeTextSwatchOption}}" stepKey="seeTextSwatch"/> + <see userInput="{{SimpleProduct.name}}" stepKey="assertTextSwatchProduct"/> + <!--Assert that attribute values present in layered navigation --> + <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage1"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad1"/> + <click selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryVisualSwatch}}" stepKey="clickVisualSwatch"/> + <click selector="{{StorefrontCategorySidebarSection.seeVisualSwatchOption}}" stepKey="seeVisualSwatch"/> + <see userInput="{{DownloadableProduct.name}}" stepKey="assertVisualSwatchProduct"/> + <!--Verfiy the text swatch attribute product appears in search option with option one --> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionOne"> + <argument name="phrase" value="textSwatchOption1"/> + </actionGroup> + <see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeTextSwatchAttributeProductName"/> + <!--Verfiy the text swatch attribute product does not appears in search option with option two --> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage1"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionTwo"> + <argument name="phrase" value="textSwatchOption2"/> + </actionGroup> + <dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="{{SimpleProduct.name}}" stepKey="doNotSeeProduct"/> + <!--Verfiy the visual swatch attribute product appears in search option with option two --> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage2"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionTwo1"> + <argument name="phrase" value="visualSwatchOption2"/> + </actionGroup> + <see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{DownloadableProduct.name}}" stepKey="seeVisualSwatchAttributeProductName"/> + <!--Verfiy the visual swatch attribute product does not appears in search option with option one --> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage3"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionOne1"> + <argument name="phrase" value="visualSwatchOption1"/> + </actionGroup> + <dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="{{DownloadableProduct.name}}" stepKey="doNotSeeProduct1"/> + </test> +</tests> From 3d02b0888863dddc9df3a4dcfd0246878b402068 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 24 Apr 2023 12:26:25 +0530 Subject: [PATCH 115/277] Rename test case name --- ...pleOneTest.xml => OrderDataGridDisplaysPurchaseDateTest.xml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename app/code/Magento/Sales/Test/Mftf/Test/{SampleOneTest.xml => OrderDataGridDisplaysPurchaseDateTest.xml} (99%) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml similarity index 99% rename from app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml rename to app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml index 19e251597dc8f..67f5c19fe98f5 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/SampleOneTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.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="SampleOneTest"> + <test name="OrderDataGridDisplaysPurchaseDateTest"> <annotations> <title value="Order Data Grid displays Purchase Date in correct format"/> <description value="Order Data Grid displays Purchase Date in correct format"/> From 0ae13142f94b63860635605e5ad28df0e1b54fe6 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 24 Apr 2023 12:29:54 +0530 Subject: [PATCH 116/277] added stories --- .../Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml index 67f5c19fe98f5..8299e4c4fd962 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml @@ -10,6 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="OrderDataGridDisplaysPurchaseDateTest"> <annotations> + <stories value="verify purchase date format"/> <title value="Order Data Grid displays Purchase Date in correct format"/> <description value="Order Data Grid displays Purchase Date in correct format"/> <testCaseId value="AC-4455"/> From 69c5065739f28bc785322f56ad5ed6ba60022b98 Mon Sep 17 00:00:00 2001 From: sharuksyed <92149337+glo74186@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:39:14 +0530 Subject: [PATCH 117/277] Update EuropeanCountriesSystemCheckBoxActionGroup.xml ACQE-3393 : Added extends line code --- .../ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml index 64245ae127597..055715d71f93c 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/EuropeanCountriesSystemCheckBoxActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="EuropeanCountriesSystemCheckBoxActionGroup"> + <actionGroup name="EuropeanCountriesSystemCheckBoxActionGroup" extends="EuropeanCountriesOptionActionGroup"> <annotations> <description>check system value european country option value</description> </annotations> From 772afa81d62c05b77f48194f4521b1fc5d44a97a Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 24 Apr 2023 14:49:26 +0530 Subject: [PATCH 118/277] removing duplicate stepkey --- .../AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml index c9452843754f3..3d6c1077fdb36 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml @@ -16,14 +16,14 @@ <argument name="timeZoneName" type="string"/> </arguments> <amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="navigateToLocaleConfigurationPage"/> - <waitForPageLoad stepKey="waitForPageLoad"/> + <waitForPageLoad stepKey="waitForPageLoadPostNavigateToLocaleConfigurationPage"/> <click selector="{{LocaleOptionsSection.changeStoreConfigButton}}" stepKey="changeStoreButton"/> <wait time="10" stepKey="waitForStoreOption"/> <click selector="{{LocaleOptionsSection.changeStoreConfigToSpecificWebsite(websiteName)}}" stepKey="selectNewWebsite"/> <wait time="10" stepKey="waitForWebsiteChange"/> <!-- Accept the current popup visible on the page. --> <click selector="{{LocaleOptionsSection.changeWebsiteConfirmButton}}" stepKey="confirmModal"/> - <wait time="10" stepKey="waitForPageLoad"/> + <wait time="10" stepKey="waitForPageToApplyConfig"/> <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.CheckIfTabExpand}}" visible="true"/> <click selector="{{LocaleOptionsSection.checkboxTimeZone}}" stepKey="unCheckCheckbox"/> <waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/> From aa60dc9244422983265bdfad560689508ac1bcdc Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 24 Apr 2023 15:52:15 +0530 Subject: [PATCH 119/277] resolve entity refernce --- .../AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml index 3d6c1077fdb36..d5d66a4117f59 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml @@ -24,7 +24,7 @@ <!-- Accept the current popup visible on the page. --> <click selector="{{LocaleOptionsSection.changeWebsiteConfirmButton}}" stepKey="confirmModal"/> <wait time="10" stepKey="waitForPageToApplyConfig"/> - <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.CheckIfTabExpand}}" visible="true"/> + <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.checkIfTabExpand}}" visible="true"/> <click selector="{{LocaleOptionsSection.checkboxTimeZone}}" stepKey="unCheckCheckbox"/> <waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/> <selectOption userInput="{{timeZoneName}}" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultOption"/> From d7712180daf30ffb413f96f794ef06341e443410 Mon Sep 17 00:00:00 2001 From: Rithica <rithica@BLR1-LHP-N73295.local> Date: Mon, 24 Apr 2023 16:16:41 +0530 Subject: [PATCH 120/277] AC-5727 Simple products are displayed after search --- .../Section/AdminProductFormSection/AdminProductFormSection.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml index 82d5365c723dd..c58fe31e01fb3 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml @@ -83,7 +83,6 @@ <element name="newAddedAttributeValue" type="text" selector="//option[contains(@data-title,'{{attributeValue}}')]" parameterized="true"/> <element name="country_Of_Manufacture" type="select" selector="//td[contains(text(), 'country_of_manufacture')]"/> <element name="textArea" type="text" selector="//textarea[@name='product[test_custom_attribute]']" timeout="30"/> - <element name="attributeRequiredInput" type="input" selector="//input[contains(@name, 'product[{{attributeCode}}]')]" parameterized="true"/> <element name="saveCategory" type="button" selector="//button[@data-action='close-advanced-select']" timeout="30"/> </section> </sections> From 9aa8827021f6b8e8f5ee8c8ad9341f90393304d2 Mon Sep 17 00:00:00 2001 From: Rithica <rithica@BLR1-LHP-N73295.local> Date: Mon, 24 Apr 2023 17:07:30 +0530 Subject: [PATCH 121/277] AC-5727 Simple products are displayed after search --- .../Section/AdminProductFormSection/AdminProductFormSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml index c58fe31e01fb3..b6fdc84271eec 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminProductFormSection.xml @@ -84,5 +84,6 @@ <element name="country_Of_Manufacture" type="select" selector="//td[contains(text(), 'country_of_manufacture')]"/> <element name="textArea" type="text" selector="//textarea[@name='product[test_custom_attribute]']" timeout="30"/> <element name="saveCategory" type="button" selector="//button[@data-action='close-advanced-select']" timeout="30"/> + <element name="attributeRequiredInputField" type="select" selector="//select[contains(@name, 'product[{{attributeCode}}]')]" parameterized="true"/> </section> </sections> From 42e5cadeb73dd3c04f3572e647ff5384b6b2e5c3 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Mon, 24 Apr 2023 18:59:01 +0530 Subject: [PATCH 122/277] AC-8385: MFTF Test Fix --- .../StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml | 10 ++-------- .../Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml | 5 ++++- ...ePageCheckoutAsCustomerUsingDefaultAddressTest.xml | 11 ++--------- ...geCheckoutAsCustomerUsingNonDefaultAddressTest.xml | 10 ++-------- ...StorefrontCheckoutWithSpecialPriceProductsTest.xml | 9 ++------- .../StorefrontCustomerLoginDuringCheckoutTest.xml | 9 ++------- .../Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml | 2 ++ .../Magento/Quote/Model/QuoteAddressValidator.php | 2 +- ...torefrontCreateOrderWithDifferentAddressesTest.xml | 11 ++--------- 9 files changed, 19 insertions(+), 50 deletions(-) diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml index 8a15a24baa6f5..349dba387138f 100644 --- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml +++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml @@ -21,11 +21,7 @@ <group value="storefront_captcha_enabled"/> </annotations> <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> - <argument name="Enable" value="Yes"/> - </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">20</field> @@ -69,10 +65,8 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <!-- Admin Login, Disable Config settings and Admin Logout --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> - <argument name="Enable" value="No"/> - </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!-- Reindex and flush cache --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml index 3b0fad592fed8..7a10c0e949e31 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -18,13 +18,16 @@ <testCaseId value="MAGETWO-87014"/> <group value="pr_exclude"/> </annotations> + <before> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> + </before> <after> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!--Login to Admin Area--> <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminArea"/> - <!--Admin creates product--> <!--Create Simple Product--> <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageSimple"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml index b877d727d7969..f770e7f42caec 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml @@ -20,23 +20,15 @@ <group value="mtf_migrated"/> </annotations> <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> - <argument name="Enable" value="Yes"/> - </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">560</field> </createData> - <!-- Create customer --> <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> </before> <after> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> - <argument name="Enable" value="No"/> - </actionGroup> <!-- Admin log out --> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> @@ -48,6 +40,7 @@ <!-- Delete customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!-- Add Simple Product to cart --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml index d8619a59da0ec..68205dd0a369d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml @@ -20,11 +20,7 @@ <group value="mtf_migrated"/> </annotations> <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> - <argument name="Enable" value="Yes"/> - </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">560</field> @@ -34,9 +30,6 @@ <createData entity="Customer_DE_UK_US" stepKey="createCustomer"/> </before> <after> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> - <argument name="Enable" value="No"/> - </actionGroup> <!-- Admin log out --> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> @@ -48,6 +41,7 @@ <!-- Delete customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!-- Add Simple Product to cart --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml index 30ce72594bb52..a12288e9d25ef 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml @@ -18,10 +18,7 @@ </annotations> <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> - <argument name="Enable" value="Yes"/> - </actionGroup> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> <createData entity="defaultSimpleProduct" stepKey="simpleProduct"> <field key="price">10.00</field> @@ -104,13 +101,11 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> - <argument name="Enable" value="No"/> - </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml index e5651891d4e00..ec4593cf133b0 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml @@ -19,14 +19,12 @@ <group value="OnePageCheckout"/> </annotations> <before> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <!-- Create simple product --> <createData entity="SimpleProduct2" stepKey="createProduct"/> <!-- Login as admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> - <argument name="Enable" value="Yes"/> - </actionGroup> </before> <after> <!-- Delete simple product --> @@ -42,12 +40,9 @@ <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> <argument name="customerEmail" value="CustomerEntityOne.email"/> </actionGroup> - <!-- Logout admin --> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> - <argument name="Enable" value="No"/> - </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!-- Go to Storefront as Guest and create new account --> <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml index 6e7fe4e259d7a..cee34fb258aa3 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -23,6 +23,7 @@ </skip> </annotations> <before> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> <actionGroup ref="AdminLoginActionGroup" after="resetCookieForCart" stepKey="loginAsAdmin"/> </before> @@ -32,6 +33,7 @@ <actionGroup ref="DeleteCustomerFromAdminActionGroup" stepKey="deleteCustomerFromAdmin"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <!-- Step 0: User signs up an account --> <comment userInput="Start of signing up user account" stepKey="startOfSigningUpUserAccount" /> diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index dd321b4df5ad1..a07102c53e736 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -25,7 +25,6 @@ class QuoteAddressValidator { private const XML_CHECKOUT_CONFIG_VALUE = 'checkout/async'; - /** * @var AddressRepositoryInterface */ @@ -168,6 +167,7 @@ public function validateForCart(CartInterface $cart, AddressInterface $address): if ((!$this->deploymentConfig->get(self::XML_CHECKOUT_CONFIG_VALUE)) && $cart->getCustomerIsGuest()) { $this->doValidateForGuestQuoteAddress($address, $cart); } + $this->doValidate($address, $cart->getCustomerIsGuest() ? null : (int) $cart->getCustomer()->getId()); } diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml index 942d85bbd4864..59c15c877bd72 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontCreateOrderWithDifferentAddressesTest.xml @@ -15,23 +15,16 @@ <group value="sales"/> </annotations> <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="EnablingGuestCheckoutLogin"> - <argument name="Enable" value="Yes"/> - </actionGroup> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> <createData entity="Customer_UK_US" stepKey="createCustomer"/> </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCreateCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - - <actionGroup ref="AdminEnableDisableGuestCheckoutLoginActionGroup" stepKey="DisablingGuestCheckoutLogin"> - <argument name="Enable" value="No"/> - </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPage"> From c79caa42e69313874aa06898d45781ffdea5bab7 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Tue, 25 Apr 2023 10:56:30 +0530 Subject: [PATCH 123/277] AC-8385: MFTF Test Fix --- ...ontCaptchaOnOnepageCheckoutPyamentTest.xml | 3 -- ...ntCheckoutWithSpecialPriceProductsTest.xml | 1 + ...leDisableGuestCheckoutLoginActionGroup.xml | 28 ----------------- .../Mftf/Page/AdminConfigCheckoutPage.xml | 13 -------- .../Section/AdminSalesCheckoutSection.xml | 13 -------- .../Mftf/Section/ConfigurationCheckTest.xml | 30 ------------------- 6 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.xml delete mode 100644 app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml delete mode 100644 app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml delete mode 100644 app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml index 349dba387138f..4ab4ec7f055f9 100644 --- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml +++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnOnepageCheckoutPyamentTest.xml @@ -63,9 +63,6 @@ <!-- Delete customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <!-- Admin Login, Disable Config settings and Admin Logout --> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml index a12288e9d25ef..07d1378d00529 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml @@ -19,6 +19,7 @@ <before> <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> <createData entity="defaultSimpleProduct" stepKey="simpleProduct"> <field key="price">10.00</field> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.xml deleted file mode 100644 index a2fd16a2efec5..0000000000000 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDisableGuestCheckoutLoginActionGroup.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="AdminEnableDisableGuestCheckoutLoginActionGroup"> - <annotations> - <description>Goes to the 'Configuration' page for 'Admin'> Sales > . Enables / Disables 'Guest Checkout Login'. Clicks on the Save button.</description> - </annotations> - <arguments> - <argument name="Enable" type="string"/> - </arguments> - <amOnPage url="{{AdminConfigCheckoutPage.url('')}}" stepKey="navigateToSalesCheckoutPage"/> - <waitForPageLoad stepKey="waitForSalesCheckoutPageToLoad"/> - <conditionalClick selector="{{AdminConfigSection.collapsibleSectionByTitle('Checkout Options')}}" dependentSelector="{{AdminConfigSection.expandedSectionByTitle('Checkout Options')}}" visible="false" stepKey="expandCheckoutOptionSection" /> - <waitForElement selector="{{AdminConfigSection.expandedSectionByTitle('Checkout Options')}}" stepKey="waitOpenedSection"/> - <uncheckOption selector="{{AdminSalesCheckoutSection.chkUseSystemValueOptions('enable_guest_checkout_login')}}" stepKey="uncheckUseSystemValueForGuestCheckoutLogin"/> - <selectOption selector="{{AdminSalesCheckoutSection.selectCheckoutOptionsDropdown('enable_guest_checkout_login')}}" userInput="{{Enable}}" stepKey="selectYesNo"/> - <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> - <waitForPageLoad stepKey="waitForPageLoadPostSavingTheConfig"/> - <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml deleted file mode 100644 index 89700dfecc4f2..0000000000000 --- a/app/code/Magento/Config/Test/Mftf/Page/AdminConfigCheckoutPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?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="AdminConfigCheckoutPage" url="admin/system_config/edit/section/checkout/" area="admin" module="Magento_Config"> - <section name="SalesAdminCheckoutSection"/> - </page> -</pages> diff --git a/app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml deleted file mode 100644 index 9be013da544cc..0000000000000 --- a/app/code/Magento/Config/Test/Mftf/Section/AdminSalesCheckoutSection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?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="AdminSalesCheckoutSection"> - <element name="chkUseSystemValueOptions" type="checkbox" selector="//input[@name='groups[options][fields][{{arg}}][inherit]' and @type='checkbox']" parameterized="true"/> - <element name="selectCheckoutOptionsDropdown" type="select" selector="//select[@name='groups[options][fields][{{arg}}][value]']" parameterized="true"/> - </section> -</sections> diff --git a/app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml b/app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml deleted file mode 100644 index c069b5d993020..0000000000000 --- a/app/code/Magento/Config/Test/Mftf/Section/ConfigurationCheckTest.xml +++ /dev/null @@ -1,30 +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="ConfigurationCheckTest"> - <annotations> - <stories value="Dynamic Media URL1"/> - <title value="Verify that Allow Dynamic Media URLs setting is removed from configuration page1"/> - <description value="Verify that Allow Dynamic Media URLs setting is removed from configuration page1"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-31781"/> - </annotations> - <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - </before> - <after> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> - </after> - <amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPage" /> - <waitForPageLoad stepKey="waitForPageLoad"/> - <conditionalClick stepKey="expandStorefrontTab" selector="{{CatalogSection.storefront}}" dependentSelector="{{CatalogSection.CheckIfTabExpand}}" visible="true" /> - <dontSee stepKey="dontSeeDynamicMediaURLsSetting" userInput="Allow Dynamic Media URLs"/> - </test> -</tests> From 9c39c25173e49e6e324aad281229c4d54647687f Mon Sep 17 00:00:00 2001 From: Rithica <rithica@BLR1-LHP-N73295.local> Date: Tue, 25 Apr 2023 12:15:21 +0530 Subject: [PATCH 124/277] AC-5727 --- .../Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml index e157bd873f9e7..3533d8c343965 100644 --- a/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml +++ b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml @@ -29,6 +29,7 @@ <waitForElementNotVisible selector="{{AdminManageSwatchSection.swatchWindowUnavailable('0')}}" stepKey="waitForImageUploaded1"/> <fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="visualSwatchOption1" stepKey="fillAdmin1"/> <fillField selector="{{AdminManageSwatchSection.visualSwatchDefaultStoreViewBox('0')}}" userInput="visualSwatchOption1" stepKey="fillSwatchDefaultStoreViewBox1"/> + <click selector="{{AdminManageSwatchSection.visualSwatchDefaultStoreViewBox('0')}}" stepKey="clickOutsideToDisableDropDown"/> <!-- Set swatch image #2 --> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> <executeJS function="jQuery('#swatch_window_option_option_1').click()" stepKey="clickSwatch2"/> From ec86f52f1219c0b7ed8e2ad8f2f3382de7eda73a Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Tue, 25 Apr 2023 12:20:17 +0530 Subject: [PATCH 125/277] Fedex Shipping Method Configuration Fix --- .../Fedex/Model/Config/Backend/FedexUrl.php | 4 +- .../Model/Config/Backend/FedexUrlTest.php | 62 +++++++++++++++---- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php b/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php index 85df4aac919c9..33cd6f64de9cf 100644 --- a/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php +++ b/app/code/Magento/Fedex/Model/Config/Backend/FedexUrl.php @@ -28,7 +28,6 @@ class FedexUrl extends Value * @var Url */ private Url $url; - /** * @param Context $context * @param Registry $registry @@ -61,7 +60,8 @@ public function __construct( */ public function beforeSave(): AbstractModel { - $isValid = $this->url->isValid($this->getValue()); + $isValid = $this->url->isValid($this->getValue(), ['http', 'https']); + if ($isValid) { // phpcs:ignore Magento2.Functions.DiscouragedFunction $host = parse_url((string)$this->getValue(), \PHP_URL_HOST); diff --git a/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php b/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php index fa3d7ea9dcfbf..56626222312bf 100644 --- a/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php +++ b/app/code/Magento/Fedex/Test/Unit/Model/Config/Backend/FedexUrlTest.php @@ -8,9 +8,18 @@ namespace Magento\Fedex\Test\Unit\Model\Config\Backend; +use Magento\Fedex\Model\Config\Backend\FedexUrl; +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Event\ManagerInterface; use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\Model\Context; +use Magento\Framework\Registry; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; -use Magento\Fedex\Model\Config\Backend\FedexUrl; +use Magento\Framework\Validator\Url; +use Magento\Rule\Model\ResourceModel\AbstractResource; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -22,16 +31,44 @@ class FedexUrlTest extends TestCase /** * @var FedexUrl */ - private $config; + private $urlConfig; /** - * @return void + * @var Url */ + private $url; + + /** + * @var Context|MockObject + */ + private $contextMock; + protected function setUp(): void { $objectManager = new ObjectManager($this); - /** @var FedexUrl $fedexUrl */ - $this->config = $objectManager->getObject(FedexUrl::class); + $this->contextMock = $this->createMock(Context::class); + $registry = $this->createMock(Registry::class); + $config = $this->createMock(ScopeConfigInterface::class); + $cacheTypeList = $this->createMock(TypeListInterface::class); + $this->url = $this->createMock(Url::class); + $resource = $this->createMock(AbstractResource::class); + $resourceCollection = $this->createMock(AbstractDb::class); + $eventManagerMock = $this->getMockForAbstractClass(ManagerInterface::class); + $eventManagerMock->expects($this->any())->method('dispatch'); + $this->contextMock->expects($this->any())->method('getEventDispatcher')->willReturn($eventManagerMock); + + $this->urlConfig = $objectManager->getObject( + FedexUrl::class, + [ + 'url' => $this->url, + 'context' => $this->contextMock, + 'registry' => $registry, + 'config' => $config, + 'cacheTypeList' => $cacheTypeList, + 'resource' => $resource, + 'resourceCollection' => $resourceCollection, + ] + ); } /** @@ -39,22 +76,25 @@ protected function setUp(): void * @param string|null $data The valid data * @throws ValidatorException */ - public function testBeforeSave(string $data = null) + public function testBeforeSave(string $data = null): void { - $this->config->setValue($data); - $this->config->beforeSave(); + $this->url->expects($this->any())->method('isValid')->willReturn(true); + $this->urlConfig->setValue($data); + $this->urlConfig->beforeSave(); + $this->assertTrue($this->url->isValid($data)); } /** * @dataProvider invalidDataProvider * @param string $data The invalid data */ - public function testBeforeSaveErrors(string $data) + public function testBeforeSaveErrors(string $data): void { + $this->url->expects($this->any())->method('isValid')->willReturn(true); $this->expectException('Magento\Framework\Exception\ValidatorException'); $this->expectExceptionMessage('Fedex API endpoint URL\'s must use fedex.com'); - $this->config->setValue($data); - $this->config->beforeSave(); + $this->urlConfig->setValue($data); + $this->urlConfig->beforeSave(); } /** From a31d6f6a1a19dd853e814822f7a5a6038718c0c0 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Tue, 25 Apr 2023 13:21:47 +0530 Subject: [PATCH 126/277] Added purchaseOrderNumber element in CheckoutSuccessMainSection --- .../Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml index abdb4ddac7343..e5e912af73343 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml @@ -21,5 +21,6 @@ <element name="printLink" type="button" selector=".print" timeout="30"/> <element name="orderNumberWithoutLink" type="text" selector="//div[contains(@class, 'checkout-success')]//p/span"/> <element name="orderLinkByOrderNumber" type="text" selector="//div[contains(@class,'success')]//a[contains(.,'{{orderNumber}}')]" parameterized="true" timeout="30"/> + <element name="purchaseOrderNumber" type="text" selector="div.checkout-success > p:nth-child(1) > a span"/> </section> </sections> From d545af0766f4b2007c33b210cd2b2de3b320c008 Mon Sep 17 00:00:00 2001 From: Rithica <rithica@BLR1-LHP-N73295.local> Date: Tue, 25 Apr 2023 13:23:56 +0530 Subject: [PATCH 127/277] AC-5727 AdminSimpleProductwithTextandVisualSwatchTest --- .../Test/Mftf/Section/AdminManageSwatchSection.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index fbf3662875697..1c45331b83f8f 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -31,7 +31,12 @@ <element name="nthDelete" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) button.delete-option" parameterized="true"/> <element name="deleteBtn" type="button" selector="#manage-options-panel:nth-of-type({{var}}) button.delete-option" parameterized="true"/> <element name="manageSwatchSection" type="block" selector='//legend/span[contains(text(),"Manage Swatch (Values of Your Attribute)")]'/> + <element name="updateSwatchText" type="input" selector="//td[contains(@class,'col-swatch col-swatch-min-width')][{{index}}]//input" parameterized="true"/> + <element name="updateDescriptionSwatchText" type="input" selector="//td[contains(@class,'col-swatch-min-width swatch-col')][{{index}}]//input[@placeholder='Description']" parameterized="true"/> + <element name="swatchWindowEdit" type="button" selector="//div[@class='swatch_window'][{{args}}]/.." parameterized="true"/> + <element name="updateSwatchTextValues" type="input" selector="//tbody[@data-role='swatch-visual-options-container']//tr[{{row}}]//td[{{col}}]//input" parameterized="true"/> + <element name="nthSwatchWindowEdit" type="button" selector="//tbody[@data-role='swatch-visual-options-container']//tr[{{row}}]//div[@class='swatch_window'][{{col}}]/.." parameterized="true"/> + <element name="defaultLabelField" type="input" selector="//input[@id='attribute_label']"/> <element name="visualSwatchDefaultStoreViewBox" type="input" selector="input[name='optionvisual[value][option_{{index}}][1]']" parameterized="true"/> - </section> </sections> From 72f95aa0584e6bca314e53ca63415a158f58ce8c Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Tue, 25 Apr 2023 17:34:00 +0530 Subject: [PATCH 128/277] AC-8385: MFTF Test Fix --- .../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 07c5da9c6f7ba..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 @@ -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 22:59:59'] + ['7d', '', '', '0 0 6 23:59:59'] ]; } From 52ea54c17b5a73a24338e9adfd90375f120bb2f0 Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Tue, 25 Apr 2023 19:50:42 +0530 Subject: [PATCH 129/277] ACQE-4834 : Verify Multi shipping with creation new customer and addresses during checkout --- .../EnterAddressDetailsActionGroup.xml | 18 ++ ...illNewCustomerAddressFieldsActionGroup.xml | 22 +++ ...FillCustomerCreateAnAccountActionGroup.xml | 19 +++ .../MultishippingSection.xml | 1 + .../Mftf/Section/ShippingMethodSection.xml | 1 + ...CustomerAndAddressesDuringCheckoutTest.xml | 159 ++++++++++++++++++ 6 files changed, 220 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterAddressDetailsActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/FillNewCustomerAddressFieldsActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillCustomerCreateAnAccountActionGroup.xml create mode 100644 app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterAddressDetailsActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterAddressDetailsActionGroup.xml new file mode 100644 index 0000000000000..074b93d860f19 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterAddressDetailsActionGroup.xml @@ -0,0 +1,18 @@ +<!-- + /** + * 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="EnterAddressDetailsActionGroup" extends="EnterCustomerAddressInfoActionGroup"> + <annotations> + <description>Removed specific page. Fills in the required details </description> + </annotations> + + <remove keyForRemoval="goToAddressPage"/> + <remove keyForRemoval="saveAddress"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/FillNewCustomerAddressFieldsActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/FillNewCustomerAddressFieldsActionGroup.xml new file mode 100644 index 0000000000000..d31bacf807ec3 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/FillNewCustomerAddressFieldsActionGroup.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="FillNewCustomerAddressFieldsActionGroup" extends="FillNewCustomerAddressRequiredFieldsActionGroup"> + <annotations> + <description>Select country before select state </description> + </annotations> + <arguments> + <argument name="address" type="entity"/> + </arguments> + + <remove keyForRemoval="selectCountry"/> + <selectOption selector="{{StorefrontCustomerAddressFormSection.country}}" userInput="{{address.country}}" stepKey="selectCountryField" after="fillStreetAddress"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillCustomerCreateAnAccountActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillCustomerCreateAnAccountActionGroup.xml new file mode 100644 index 0000000000000..f08a2422e0230 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillCustomerCreateAnAccountActionGroup.xml @@ -0,0 +1,19 @@ +<?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="StorefrontFillCustomerCreateAnAccountActionGroup" extends="StorefrontFillCustomerAccountCreationFormActionGroup"> + <annotations> + <description>Fills in the provided Customer details on the Storefront Customer creation page.</description> + </annotations> + + <remove keyForRemoval="fillFirstName"/> + <remove keyForRemoval="fillLastName"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml index 304f0a9c7a12a..aae7cd7f7af9b 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml @@ -18,5 +18,6 @@ <element name="productLink" type="button" selector="(//form[@id='checkout_multishipping_form']//a[contains(text(),'{{productName}}')])[{{sequenceNumber}}]" parameterized="true"/> <element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/> <element name="back" type="button" selector=".action.back"/> + <element name="enterNewAddress" type="button" selector=".action.add"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml index ef41ed3f47f3a..eec39c3d10e4b 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml @@ -12,5 +12,6 @@ <element name="shippingMethodRadioButton" type="select" selector="//input[@class='radio']"/> <element name="selectShippingMethod" type="radio" selector="//div[@class='block block-shipping'][position()={{shippingBlockPosition}}]//dd[position()={{shippingMethodPosition}}]//input[@class='radio']" parameterized="true" timeout="5"/> <element name="goToBillingInfo" type="button" selector=".action.primary.continue"/> + <element name="productDetails" type="text" selector="//a[text()='{{var1}}']/../../..//td[@class='col qty' and text()='{{var2}}']" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml new file mode 100644 index 0000000000000..6ad39cf7a1820 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml @@ -0,0 +1,159 @@ +<?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="MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest"> + <annotations> + <stories value="Multi shipping with creation new customer and addresses during checkout"/> + <title value="Verify Multi shipping with creation new customer and addresses during checkout"/> + <description value="Verify Multi shipping with creation new customer and addresses during checkout"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4685" /> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminArea"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + <field key="name">simple product</field> + </createData> + <!-- Create configurable product --> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + <field key="name">config product</field> + </createData> + <!-- Search for the Created Configurable Product --> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openConfigurableProductEditPage"> + <argument name="productId" value="$createConfigProduct.id$"/> + </actionGroup> + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/> + <waitForPageLoad stepKey="waitForSelectAttributesPage"/> + <actionGroup ref="AdminSelectAttributeInConfigurableAttributesGrid" stepKey="selectColorAttribute"> + <argument name="attributeCode" value="color"/> + </actionGroup> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton"/> + <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="waitCreateNewValueAppears"/> + <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue1"/> + <fillField userInput="Red" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute1"/> + <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute1"/> + <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue2"/> + <fillField userInput="Green" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute2"/> + <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute2"/> + <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/> + <click selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="clickOnApplySinglePriceToAllSkus"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="10" stepKey="enterAttributePrice"/> + <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterAttributeQuantity"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextStep3"/> + <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextPageOpened"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="generateProducts"/> + <waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveButtonVisible"/> + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProduct"/> + <conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="clickOnConfirmInPopup"/> + <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/> + </before> + <after> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="deleteAllProducts"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <!-- Delete customer --> + <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> + <argument name="email" value="{{CustomerEntityOne.email}}"/> + </actionGroup> + <actionGroup ref="AdminDeleteCreatedColorAttributeActionGroup" stepKey="deleteRedColorAttribute"> + <argument name="Color" value="Red"/> + </actionGroup> + <actionGroup ref="AdminDeleteCreatedColorAttributeActionGroup" stepKey="deleteBlueColorAttribute"> + <argument name="Color" value="Green"/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> + </after> + <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="openCategoryPage"> + <argument name="categoryUrl" value="$$createCategory.custom_attributes[url_key]$$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPage"/> + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"> + <argument name="product" value="$createSimpleProduct$"/> + </actionGroup> + <!-- Add configurable product to the cart --> + <actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart1"> + <argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" /> + <argument name="productAttribute" value="Color"/> + <argument name="productOption" value="Red"/> + <argument name="qty" value="1"/> + </actionGroup> + <actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart2"> + <argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" /> + <argument name="productAttribute" value="Color"/> + <argument name="productOption" value="Green"/> + <argument name="qty" value="1"/> + </actionGroup> + <!-- Check Out with Multiple Addresses --> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> + <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> + <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> + <!--Create an account--> + <waitForElementVisible selector="{{AdminCreateUserSection.createAnAccountButtonForCustomer}}" stepKey="waitCreateAnAccountButton"/> + <click selector="{{AdminCreateUserSection.createAnAccountButtonForCustomer}}" stepKey="clickOnCreateAnAccountButton"/> + <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> + <actionGroup ref="EnterAddressDetailsActionGroup" stepKey="enterAddressInfo"> + <argument name="Address" value="US_Address_CA"/> + </actionGroup> + <actionGroup ref="StorefrontFillCustomerCreateAnAccountActionGroup" stepKey="fillDetails"> + <argument name="customer" value="CustomerEntityOne"/> + </actionGroup> + <actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/> + <click selector="{{MultishippingSection.enterNewAddress}}" stepKey="clickOnAddress"/> + <waitForPageLoad stepKey="waitForAddressFieldsPageOpen"/> + <actionGroup ref="FillNewCustomerAddressFieldsActionGroup" stepKey="editAddressFields"> + <argument name="address" value="DE_Address_Berlin_Not_Default_Address"/> + <argument name="address" value="DE_Address_Berlin_Not_Default_Address"/> + </actionGroup> + <actionGroup ref="StorefrontSaveCustomerAddressActionGroup" stepKey="saveAddress"/> + <waitForPageLoad stepKey="waitForShippingPageToOpen"/> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectCAAddress"> + <argument name="sequenceNumber" value="1"/> + <argument name="option" value="John Doe, 7700 West Parmer Lane 113, Los Angeles, California 90001, United States"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectCAAddressForSecondProduct"> + <argument name="sequenceNumber" value="2"/> + <argument name="option" value="John Doe, 7700 West Parmer Lane 113, Los Angeles, California 90001, United States"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectGEAddress"> + <argument name="sequenceNumber" value="3"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, Berlin 10789, Germany"/> + </actionGroup> + <actionGroup ref="StorefrontChangeMultishippingItemQtyActionGroup" stepKey="setProductQuantity"> + <argument name="sequenceNumber" value="3"/> + <argument name="quantity" value="10"/> + </actionGroup> + <actionGroup ref="StorefrontSaveAddressActionGroup" stepKey="saveAddresses"/> + <waitForPageLoad stepKey="waitForPageToLoadProperly"/> + <seeElement selector="{{ShippingMethodSection.productDetails('simple product','1')}}" stepKey="assertSimpleProductDetails"/> + <seeElement selector="{{ShippingMethodSection.productDetails('config product','1')}}" stepKey="assertConfigProductRedDetails"/> + <seeElement selector="{{ShippingMethodSection.productDetails('config product','10')}}" stepKey="assertConfigProductGreenDetails"/> + <!-- Click 'Continue to Billing Information' --> + <actionGroup ref="StorefrontLeaveDefaultShippingMethodsAndGoToBillingInfoActionGroup" stepKey="useDefaultShippingMethod"/> + <!-- Click 'Go to Review Your Order' --> + <actionGroup ref="SelectBillingInfoActionGroup" stepKey="useDefaultBillingMethod"/> + <!-- Click 'Place Order' --> + <actionGroup ref="PlaceOrderActionGroup" stepKey="placeOrder"/> + <waitForPageLoad stepKey="waitForOrderPlace"/> + <grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('1')}}" stepKey="grabFirstOrderId"/> + <grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('2')}}" stepKey="grabSecondOrderId"/> + <!-- Go to My Account > My Orders and verify orderId--> + <amOnPage url="{{StorefrontCustomerOrdersHistoryPage.url}}" stepKey="goToMyOrdersPage"/> + <waitForPageLoad stepKey="waitForMyOrdersPageLoad"/> + <seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabFirstOrderId})}}" stepKey="seeFirstOrder"/> + <seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabSecondOrderId})}}" stepKey="seeSecondOrder"/> + <!-- Logout customer --> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> + </test> +</tests> From b2b3a0176f01e1f1d24d450e27e932c955d2b22c Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Tue, 25 Apr 2023 22:01:46 +0530 Subject: [PATCH 130/277] AC-8385: MFTF Test Fix --- ...AnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml index 6d13738271781..37df878652166 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml @@ -15,6 +15,7 @@ <testCaseId value="AC-1577"/> </annotations> <before> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 1" stepKey="EnablingGuestCheckoutLogin"/> <!-- Add downloadable domains --> <magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add example.com static.magento.com"/> @@ -82,6 +83,7 @@ <!-- Logout User and Admin --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <magentoCLI command="config:set checkout/options/enable_guest_checkout_login 0" stepKey="DisablingGuestCheckoutLogin"/> </after> <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPage"> From 083dba4a6cd194d4eafe02eb7ec18e1b11df88ed Mon Sep 17 00:00:00 2001 From: sharuksyed <92149337+glo74186@users.noreply.github.com> Date: Wed, 26 Apr 2023 11:34:30 +0530 Subject: [PATCH 131/277] Update MultipleAddressCheckoutWithTwoDifferentRatesTest.xml AC-4499 : shuffled some commands and added reindex command --- ...ultipleAddressCheckoutWithTwoDifferentRatesTest.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml index 861ab6d4f4859..012c4c33e2abb 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml @@ -25,9 +25,6 @@ </before> <after> <!-- Delete created data --> - <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <!-- disable table rate meth0d --> <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> <!-- Switch to Website scope --> @@ -38,6 +35,13 @@ <argument name="status" value="0"/> </actionGroup> <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <magentoCron groups="index" stepKey="reindex"/> + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> + <argument name="tags" value=""/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Stores > Configuration > Sales > Shipping Methods --> From 79ee7c9c0e15a3d076dfd164961fecb031b4962d Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Wed, 26 Apr 2023 15:23:51 +0530 Subject: [PATCH 132/277] fixing AddNewProductAttributeInProductPageTest --- .../Mftf/Test/AddNewProductAttributeInProductPageTest.xml | 2 ++ .../Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml index f5dec88789bf0..c6a054a8ef13a 100755 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml @@ -22,6 +22,8 @@ <!-- Login as admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearGridFilters"/> <!--Create Category--> <createData entity="SimpleSubCategory" stepKey="createCategory"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml index 8299e4c4fd962..07eb202567ed0 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml @@ -84,6 +84,12 @@ <deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/> <amOnPage url="{{AdminDashboardPage.url}}" stepKey="gotoOnDashboardPage"/> <waitForPageLoad stepKey="waitForDashboardPageToLoad"/> + <!-- Reset time zone for Main website--> + <actionGroup ref="AdminChangeTimeZoneForDifferentWebsiteActionGroup" stepKey="openConfigPageSecondTime"> + <argument name="websiteName" value="Main Website"/> + <argument name="timeZoneName" value="Central Standard Time (America/Chicago)"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigurationSecondTime"/> <!--set main website as default--> <actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setMainWebsiteAsDefault"> <argument name="websiteName" value="Main Website"/> From 22c54ad67d4d93ab4b08f72470d3dd8cd851cc7b Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Wed, 26 Apr 2023 16:43:17 +0530 Subject: [PATCH 133/277] Updated branch --- ...llingAgreementPayPalPaymentActionGroup.xml | 22 +++++ .../AdminBillingAgreementSection.xml | 13 +++ .../StorefrontBillingAgreementSection.xml | 19 ++++ ...llingAgreementFromCustomersAccountTest.xml | 86 +++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml new file mode 100644 index 0000000000000..1f90ef9f3c0c2 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.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="BillingAgreementPayPalPaymentActionGroup"> + <arguments> + <argument name="credentials" defaultValue="_CREDS"/> + </arguments> + <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/> + <click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/> + <waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/> + <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/> + <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="clickLogin"/> + <waitForPageLoad stepKey="waitForLoginPageLoad"/> + + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml new file mode 100644 index 0000000000000..c138a5790859e --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.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="AdminBillingAgreementSection"> + <element name="billingAgreementId" type="text" selector=".//*[@id='customer_edit_tab_agreements_table']//tbody/tr[1]/td[2]"/> + </section> +</sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml new file mode 100644 index 0000000000000..edb22ad7bcbbb --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml @@ -0,0 +1,19 @@ +<?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="StorefrontBillingAgreementSection"> + <element name="billingAgreementDropdown" type="select" selector="#payment_method"/> + <element name="createButton" type="button" selector=".//*[@type='submit']/span[contains(text(),'Create')]"/> + <element name="expandLogin" type="button" selector="#loadLogin"/> + <element name="loginButton" type="button" selector="#submitLogin"/> + <element name="agreeAndContinue" type="button" selector="#continue"/> + <element name="billingAgreementId" type="text" selector=".//td[@class='col id']"/> + <element name="successMessageNew" type="text" selector=".//*[@role='alert']//div" /> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml new file mode 100644 index 0000000000000..fe4ead627ec67 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml @@ -0,0 +1,86 @@ +<?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="CreateBillingAgreementFromCustomersAccountTest"> + <annotations> + <features value="PayPal"/> + <stories value="Billing Agreement"/> + <title value="Create Billing Agreement from customer's Account"/> + <description value="Create Billing Agreement from customer's Account"/> + <severity value="MAJOR"/> + <testCaseId value="AC-5101"/> + <group value="paypal"/> + </annotations> + <before> + <!--Enable free shipping method --> + <magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/> + + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!-- New Customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"> + <field key="firstname">John1</field> + <field key="lastname">Doe1</field> + </createData> + <actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress"> + <argument name="credentials" value="SamplePaypalExpressConfig2"/> + </actionGroup> + <actionGroup ref="AdminPayPalExpressCheckoutEnableBillingAgreementActionGroup" stepKey="enableBillingAgreement"> + <argument name="countryCode" value="us"/> + </actionGroup> + </before> + <after> + <magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/> + <magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/> + <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/> + <magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/> + <magentoCLI command="config:set payment/hosted_pro/active 0" stepKey="disableHostedProExpress"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <!--Log in to Storefront as Customer--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <!-- Go to Billing Agreement Section and click on dropdown--> + <click selector="{{StorefrontCustomerSidebarSection.sidebarCurrentTab('Billing Agreements')}}" stepKey="clickOnMyOrders"/> + <selectOption selector ="{{StorefrontBillingAgreementSection.billingAgreementDropdown}}" userInput="PayPal Billing Agreement" stepKey="enableSandboxMode"/> + <click selector="{{StorefrontBillingAgreementSection.createButton}}" stepKey="clickCreateButton"/> + <reloadPage stepKey="refreshPage1"/> + <reloadPage stepKey="refreshPage2"/> + <reloadPage stepKey="refreshPage3"/> + <!-- Login to paypal to create Billing Agreement--> + <click selector="{{StorefrontBillingAgreementSection.expandLogin}}" stepKey="expandLogin"/> + <waitForPageLoad stepKey="waitToLoadLoginPage" time="10"/> + <click selector="{{StorefrontBillingAgreementSection.loginButton}}" stepKey="clickOnLogin"/> + <waitForPageLoad stepKey="waitForBillingAgreementPage" time="10"/> + <actionGroup ref="BillingAgreementPayPalPaymentActionGroup" stepKey="loginPaypal"/> + <click selector="{{StorefrontBillingAgreementSection.agreeAndContinue}}" stepKey="clickContinue"/> + <waitForPageLoad stepKey="waitForAgreeAndContinue"/> + <grabTextFrom selector="{{StorefrontBillingAgreementSection.billingAgreementId}}" stepKey="billingID"/> + <grabTextFrom selector="{{StorefrontBillingAgreementSection.successMessageNew}}" stepKey="grabSuccessMessage"/> + <waitForPageLoad stepKey="waitToGrabSuccessMessage" time="10"/> + <!-- Assert Billing Agreement ID in Storefront--> + <assertStringContainsString stepKey="AssertProduct2"> + <actualResult type="const">$grabSuccessMessage</actualResult> + <expectedResult type="string">$billingID</expectedResult> + </assertStringContainsString> + <!-- Go to "all customers" page in Admin --> + <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomersPage"/> + <!-- Filter by first customer email and Verify Billing Agreement ID--> + <actionGroup ref="AdminFilterCustomerGridByEmail" stepKey="filterByFullValue"> + <argument name="email" value="$$createCustomer.email$$"/> + </actionGroup><actionGroup ref="AdminClickFirstRowEditLinkOnCustomerGridActionGroup" stepKey="openCustomerEditPage"/> + <click selector="{{AdminCustomerInformationSection.billingAgreements}}" stepKey="clickOnBillingAgreements"/> + <grabTextFrom selector="{{AdminBillingAgreementSection.billingAgreementId}}" stepKey="grabBillingID"/> + <assertEquals stepKey="assertSecondProductMapPrice"> + <actualResult type="const">$grabBillingID</actualResult> + <expectedResult type="string">$billingID</expectedResult> + </assertEquals> + </test> +</tests> From 95278e2af273119a159ac2b9a09cb1ff319b4958 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Wed, 26 Apr 2023 22:30:46 +0530 Subject: [PATCH 134/277] AC-8385: MFTF Test Fix --- .../Magento/Quote/Model/QuoteAddressValidator.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index a07102c53e736..188555174a05e 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -10,7 +10,6 @@ use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\Session; -use Magento\Framework\App\DeploymentConfig; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; @@ -24,7 +23,6 @@ */ class QuoteAddressValidator { - private const XML_CHECKOUT_CONFIG_VALUE = 'checkout/async'; /** * @var AddressRepositoryInterface */ @@ -42,29 +40,21 @@ class QuoteAddressValidator */ protected Session $customerSession; - /** - * @var DeploymentConfig - */ - private DeploymentConfig $deploymentConfig; - /** * Constructs a quote shipping address validator service object. * * @param AddressRepositoryInterface $addressRepository * @param CustomerRepositoryInterface $customerRepository Customer repository. * @param Session $customerSession - * @param DeploymentConfig $deploymentConfig */ public function __construct( AddressRepositoryInterface $addressRepository, CustomerRepositoryInterface $customerRepository, - Session $customerSession, - DeploymentConfig $deploymentConfig + Session $customerSession ) { $this->addressRepository = $addressRepository; $this->customerRepository = $customerRepository; $this->customerSession = $customerSession; - $this->deploymentConfig = $deploymentConfig; } /** @@ -164,10 +154,9 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI */ public function validateForCart(CartInterface $cart, AddressInterface $address): void { - if ((!$this->deploymentConfig->get(self::XML_CHECKOUT_CONFIG_VALUE)) && $cart->getCustomerIsGuest()) { + if ($cart->getCustomerIsGuest()) { $this->doValidateForGuestQuoteAddress($address, $cart); } - $this->doValidate($address, $cart->getCustomerIsGuest() ? null : (int) $cart->getCustomer()->getId()); } From 9a1f9799e36345ce1f5bef59d2766af472994c52 Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Thu, 27 Apr 2023 11:17:28 +0530 Subject: [PATCH 135/277] added actiongroup for config product and added reindex --- ...CustomerAndAddressesDuringCheckoutTest.xml | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml index 6ad39cf7a1820..276f56267f055 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml @@ -33,18 +33,11 @@ </actionGroup> <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/> <waitForPageLoad stepKey="waitForSelectAttributesPage"/> - <actionGroup ref="AdminSelectAttributeInConfigurableAttributesGrid" stepKey="selectColorAttribute"> - <argument name="attributeCode" value="color"/> + <actionGroup ref="CreateOptionsForAttributeActionGroup" stepKey="createOptions"> + <argument name="attributeName" value="Color"/> + <argument name="firstOptionName" value="Red"/> + <argument name="secondOptionName" value="Green"/> </actionGroup> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton"/> - <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="waitCreateNewValueAppears"/> - <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue1"/> - <fillField userInput="Red" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute1"/> - <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute1"/> - <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue2"/> - <fillField userInput="Green" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute2"/> - <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute2"/> - <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/> <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/> <click selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="clickOnApplySinglePriceToAllSkus"/> <fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="10" stepKey="enterAttributePrice"/> @@ -62,6 +55,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="deleteAllProducts"/> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="againClearGridFilters"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Delete customer --> <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> @@ -73,6 +67,11 @@ <actionGroup ref="AdminDeleteCreatedColorAttributeActionGroup" stepKey="deleteBlueColorAttribute"> <argument name="Color" value="Green"/> </actionGroup> + <!-- reindex and flush cache --> + <magentoCron groups="index" stepKey="reindex"/> + <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache"> + <argument name="tags" value="full_page"/> + </actionGroup> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="openCategoryPage"> From e2eb1ebfcc1ac8a9a097f0ced33d276a8ddee8a1 Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Thu, 27 Apr 2023 11:23:41 +0530 Subject: [PATCH 136/277] AC-4685 : added meaningful stepkey --- ...ingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml index 276f56267f055..a08a9092511b1 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml @@ -38,7 +38,7 @@ <argument name="firstOptionName" value="Red"/> <argument name="secondOptionName" value="Green"/> </actionGroup> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton"/> <click selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="clickOnApplySinglePriceToAllSkus"/> <fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="10" stepKey="enterAttributePrice"/> <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> From f9eb7bfc51e36caf11bb866cc4118ea758882cae Mon Sep 17 00:00:00 2001 From: syedsharuk <glo74186@adobe.com> Date: Thu, 27 Apr 2023 11:27:57 +0530 Subject: [PATCH 137/277] AC-4685 : added meaningful stepkeys --- ...ingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml index a08a9092511b1..861297b660bb0 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml @@ -43,7 +43,7 @@ <fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="10" stepKey="enterAttributePrice"/> <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterAttributeQuantity"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextStep3"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextStep"/> <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextPageOpened"/> <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="generateProducts"/> <waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveButtonVisible"/> From 82222b0ee813cf1ec9a57e83c9ee8ca425d1cdbf Mon Sep 17 00:00:00 2001 From: Shashikant521993 <81364908+Shashikant521993@users.noreply.github.com> Date: Thu, 27 Apr 2023 12:12:26 +0530 Subject: [PATCH 138/277] Update AddNewProductAttributeInProductPageTest.xml added filter in precodtion to fix test case fauliure of AddNewProductAttributeInProductPageTest. --- .../Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml index 1fd14c53337fd..5201d79be9c32 100755 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml @@ -22,6 +22,7 @@ <!-- Login as admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <!-- remove the Filter From the page--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/> <!--Create Category--> <createData entity="SimpleSubCategory" stepKey="createCategory"/> From 0b8268534ef4c332942777a1eec4bc8a99ecc222 Mon Sep 17 00:00:00 2001 From: sharuksyed <92149337+glo74186@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:32:29 +0530 Subject: [PATCH 139/277] Update MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml AC-4685: added fix for AddNewProductAttributeInProductPageTest --- ...gWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml index 861297b660bb0..f973b8f700b4c 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest.xml @@ -17,6 +17,9 @@ </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminArea"/> + <!-- remove the Filter From the page--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/> <createData entity="SimpleSubCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> @@ -55,7 +58,6 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="deleteAllProducts"/> - <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="againClearGridFilters"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Delete customer --> <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> From fae329ed6e9fb6c11ad178e7379b65c60c2f3c48 Mon Sep 17 00:00:00 2001 From: sharuksyed <92149337+glo74186@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:35:03 +0530 Subject: [PATCH 140/277] Update MultipleAddressCheckoutWithTwoDifferentRatesTest.xml AC-4499 : Added fix for this testcase AddNewProductAttributeInProductPageTest --- .../Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml index 012c4c33e2abb..8ff3f81e13ff5 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/MultipleAddressCheckoutWithTwoDifferentRatesTest.xml @@ -22,6 +22,9 @@ </createData> <createData entity="Simple_US_Customer_CA_NY_Addresses" stepKey="createCustomer"/> <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> + <!-- remove the Filter From the page--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/> </before> <after> <!-- Delete created data --> From 74cc9d2f6caec65cb24fdfab062c68bd0208ffb1 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Tue, 28 Mar 2023 13:40:27 +0530 Subject: [PATCH 141/277] AC-4389 test case Automated --- .../Section/CmsNewPagePageActionsSection.xml | 1 + .../Mftf/Section/StorefrontCMSPageSection.xml | 1 + .../Section/TinyMCESection/WidgetSection.xml | 3 + ...extFieldBoxWhileCreatingPageWidgetTest.xml | 97 +++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml diff --git a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml index a340d0af1e7a1..7d788226336fd 100644 --- a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml @@ -23,5 +23,6 @@ <element name="spinner" type="input" selector='//div[@data-component="cms_page_form.cms_page_form"]' /> <element name="saveAndClose" type="button" selector="#save_and_close" timeout="10"/> <element name="insertWidget" type="button" selector="//span[contains(text(),'Insert Widget...')]"/> + <element name="savePageBtn" type="button" selector="//button[@id='save-button']" timeout="10"/> </section> </sections> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml index bb276b2adb0de..b4cc2cceffa77 100644 --- a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml @@ -16,5 +16,6 @@ <element name="mainContent" type="text" selector="#maincontent"/> <element name="footerTop" type="text" selector="footer.page-footer"/> <element name="title" type="text" selector="//div[@class='breadcrumbs']//ul/li[@class='item cms_page']"/> + <element name="widgetContent_Apostrophe" type="text" selector="//div[@class='widget block block-cms-link']//span[contains(text(),'{{var}}')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml index 5be91f61e1e1e..8dc8bd46e0c77 100644 --- a/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml @@ -48,5 +48,8 @@ <element name="ChooserName" type="input" selector="input[name='chooser_name']"/> <element name="SelectPageButton" type="button" selector="//button[@title='Select Page...']"/> <element name="SelectPageFilterInput" type="input" selector="input.admin__control-text[name='{{filterName}}']" parameterized="true"/> + <element name="url_key_selectPage" type="input" selector="//aside[@role='dialog']//input[@name='chooser_identifier']"/> + <element name="SearchButton_selectPage" type="button" selector="//aside[@role='dialog']//button[@title='Search']"/> + <element name="search_result_selectPage" type="text" selector="//aside[@role='dialog']//td[contains(@class,'col-url col-chooser_identifier') and contains(text(),'{{var}}')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml new file mode 100644 index 0000000000000..68235928871e7 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -0,0 +1,97 @@ +<?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="CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest"> + <annotations> + <features value="Widget"/> + <stories value="Checking displaying of apostrophes (') in the text field box while creating page widget"/> + <title value="Checking displaying of apostrophes (') in the text field box while creating page widget"/> + <description value="Checking displaying of apostrophes (') in the text field box while creating page widget"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4389"/> + <group value="widget"/> + </annotations> + <before> + <!-- Pre-condition 1- Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + <!-- Pre-condition - Disable the page builder --> +<!-- <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder" after="enableTinyMCE"/>--> +<!-- <magentoCLI command="cache:clean config" stepKey="flushCache" after="disablePageBuilder"/>--> + + <!-- Pre-condition 2- Create a New Page --> +<!-- <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/>--> +<!-- <actionGroup ref="FillOutCMSPageContent" stepKey="fillBasicPageData"/>--> +<!-- <actionGroup ref="SaveCmsPageActionGroup" stepKey="saveNewPage"/>--> + + <!-- Pre-condition 3- Verify page in grid--> + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescending"/> + <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPage" /> + + <!-- Pre-condition 4- Update the page in grid--> + <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEdited"/> + <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePage"/> + <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisible"/> + + <!-- Pre-condition 5- Expand the Content section > Insert Widget --> + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/> + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplay"/> + <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="selectCMSpageLinkFromDropdown"/> + <waitForPageLoad stepKey="waitForPageLoadPostSelectingFromDropDown"/> + + <!-- Pre-condition 6 - 11 - Update the Anchor Custom Text --> + <fillField selector="{{WidgetSection.InputAnchorCustomText}}" userInput="Custom texts' for tests" stepKey="InputValuesWithApostrophe"/> + <click selector="{{WidgetSection.SelectPageButton}}" stepKey="clickOnSelectPageButton"/> + <waitForElementVisible selector="{{WidgetSection.url_key_selectPage}}" stepKey="waitForSelectPageDialogToPopulate"/> + <fillField selector="{{WidgetSection.url_key_selectPage}}" userInput="home" stepKey="EnterThePageURL"/> + <click selector="{{WidgetSection.SearchButton_selectPage}}" stepKey="clickOnSearchButton"/> + <waitForPageLoad stepKey="waitForResultsToBeDisplayed"/> + <click selector="{{WidgetSection.search_result_selectPage('home')}}" stepKey="clickOnDisplayedResult"/> + <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidget"/> + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="waitForInsertWidgetDialogToDisappear" time="5"/> + <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePage"/> + <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOut" time="5"/> + <see userInput="You saved the page." stepKey="seeSuccessMessage"/> + + </before> + <after> + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroupToReset"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFiltersToReset"/> + <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescendingToReset"/> + <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPageToReset" /> + + <!-- Pre-condition 4- Update the page in grid To Reset--> + <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEditedToReset"/> + <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePageToReset"/> + <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisibleToReset"/> + + <!-- Pre-condition 5- Expand the Content section > Insert Widget To Reset --> + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPageToReset"/> + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplayToReset"/> + <clearField selector="{{CmsNewPagePageContentSection.content}}" stepKey="clearWidgetTextFieldToReset"/> + <fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="<p>CMS homepage content goes here.</p>" stepKey="InputDefaultValuesInWidgetTextFieldToReset"/> + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="waitForInsertWidgetDialogToDisappearToReset" time="5"/> + <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePageToReset"/> + <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOutToReset" time="5"/> + <see userInput="You saved the page." stepKey="seeSuccessMessageToReset"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToHomePage"/> + <waitForPageLoad stepKey="waitToLoadHomePage"/> + <grabTextFrom selector="{{StorefrontCMSPageSection.widgetContent_Apostrophe('Custom texts')}}" stepKey="grabContentFromWidget"/> + + <assertEquals message="Asserts the widget contains apostrophe On storefront" stepKey="assertApostropheOnWidgetText"> + <expectedResult type="string">Custom texts' for tests</expectedResult> + <actualResult type="string">{$grabContentFromWidget}</actualResult> + </assertEquals> + </test> +</tests> From 4d7225c374bd08bbb6d91f3cb5df25d4987a4409 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Tue, 28 Mar 2023 13:50:02 +0530 Subject: [PATCH 142/277] provided the CLI to enable page builder --- ...rophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml index 68235928871e7..ef1ead8f1a79f 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -23,13 +23,7 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <!-- Pre-condition - Disable the page builder --> -<!-- <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder" after="enableTinyMCE"/>--> -<!-- <magentoCLI command="cache:clean config" stepKey="flushCache" after="disablePageBuilder"/>--> - - <!-- Pre-condition 2- Create a New Page --> -<!-- <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/>--> -<!-- <actionGroup ref="FillOutCMSPageContent" stepKey="fillBasicPageData"/>--> -<!-- <actionGroup ref="SaveCmsPageActionGroup" stepKey="saveNewPage"/>--> + <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> <!-- Pre-condition 3- Verify page in grid--> <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> From 3176582aa214865a9073ed7fbf4b0013c8fa8078 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Wed, 29 Mar 2023 16:30:11 +0530 Subject: [PATCH 143/277] updated the re-indexing and cache flush CLI commands --- ...ApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml index ef1ead8f1a79f..beccb68455552 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -24,7 +24,8 @@ <!-- Pre-condition - Disable the page builder --> <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> - + <magentoCLI stepKey="reindex" command="indexer:reindex"/> + <magentoCLI stepKey="flushCache" command="cache:flush"/> <!-- Pre-condition 3- Verify page in grid--> <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> From 56e69a71ee3788dfc37d5c1948a660ca6cc0c405 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Thu, 30 Mar 2023 10:41:32 +0530 Subject: [PATCH 144/277] updated the disable/enable wysiwig --- ...strophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml index beccb68455552..ad3e2b6ea6cc8 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -24,8 +24,10 @@ <!-- Pre-condition - Disable the page builder --> <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> + <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> <magentoCLI stepKey="reindex" command="indexer:reindex"/> <magentoCLI stepKey="flushCache" command="cache:flush"/> + <!-- Pre-condition 3- Verify page in grid--> <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> @@ -78,6 +80,10 @@ <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePageToReset"/> <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOutToReset" time="5"/> <see userInput="You saved the page." stepKey="seeSuccessMessageToReset"/> + <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> + <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> + <magentoCLI stepKey="reindex" command="indexer:reindex"/> + <magentoCLI stepKey="flushCache" command="cache:flush"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToHomePage"/> From 641dd76d96680814674e508616668d739eb25b54 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Tue, 11 Apr 2023 19:25:10 +0530 Subject: [PATCH 145/277] ACQE-4703 CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest - code review comments addressed - duplicate element removed and elements renamed with proper naming convention --- .../Section/CmsNewPagePageActionsSection.xml | 1 - .../Mftf/Section/StorefrontCMSPageSection.xml | 2 +- .../Section/TinyMCESection/WidgetSection.xml | 6 +-- ...extFieldBoxWhileCreatingPageWidgetTest.xml | 37 +++++++------------ 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml index 7d788226336fd..a340d0af1e7a1 100644 --- a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml @@ -23,6 +23,5 @@ <element name="spinner" type="input" selector='//div[@data-component="cms_page_form.cms_page_form"]' /> <element name="saveAndClose" type="button" selector="#save_and_close" timeout="10"/> <element name="insertWidget" type="button" selector="//span[contains(text(),'Insert Widget...')]"/> - <element name="savePageBtn" type="button" selector="//button[@id='save-button']" timeout="10"/> </section> </sections> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml index b4cc2cceffa77..de70c5706360a 100644 --- a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml @@ -16,6 +16,6 @@ <element name="mainContent" type="text" selector="#maincontent"/> <element name="footerTop" type="text" selector="footer.page-footer"/> <element name="title" type="text" selector="//div[@class='breadcrumbs']//ul/li[@class='item cms_page']"/> - <element name="widgetContent_Apostrophe" type="text" selector="//div[@class='widget block block-cms-link']//span[contains(text(),'{{var}}')]" parameterized="true"/> + <element name="widgetContentApostrophe" type="text" selector="//div[@class='widget block block-cms-link']//span[contains(text(),'{{var}}')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml index 8dc8bd46e0c77..c9ef757ca7477 100644 --- a/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/WidgetSection.xml @@ -48,8 +48,8 @@ <element name="ChooserName" type="input" selector="input[name='chooser_name']"/> <element name="SelectPageButton" type="button" selector="//button[@title='Select Page...']"/> <element name="SelectPageFilterInput" type="input" selector="input.admin__control-text[name='{{filterName}}']" parameterized="true"/> - <element name="url_key_selectPage" type="input" selector="//aside[@role='dialog']//input[@name='chooser_identifier']"/> - <element name="SearchButton_selectPage" type="button" selector="//aside[@role='dialog']//button[@title='Search']"/> - <element name="search_result_selectPage" type="text" selector="//aside[@role='dialog']//td[contains(@class,'col-url col-chooser_identifier') and contains(text(),'{{var}}')]" parameterized="true"/> + <element name="URLKeySelectPage" type="input" selector="//aside[@role='dialog']//input[@name='chooser_identifier']"/> + <element name="SearchButtonSelectPage" type="button" selector="//aside[@role='dialog']//button[@title='Search']"/> + <element name="SearchResultSelectPage" type="text" selector="//aside[@role='dialog']//td[contains(@class,'col-url col-chooser_identifier') and contains(text(),'{{var}}')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml index ad3e2b6ea6cc8..8f9fcf68d8f42 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -21,75 +21,66 @@ <before> <!-- Pre-condition 1- Login as Admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <!-- Pre-condition - Disable the page builder --> <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> - <magentoCLI stepKey="reindex" command="indexer:reindex"/> - <magentoCLI stepKey="flushCache" command="cache:flush"/> - + <magentoCLI stepKey="reindexingPostDisablingThePageBuilder" command="indexer:reindex"/> + <magentoCLI stepKey="flushCachePostDisablingThePageBuilder" command="cache:flush"/> <!-- Pre-condition 3- Verify page in grid--> <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescending"/> <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPage" /> - <!-- Pre-condition 4- Update the page in grid--> <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEdited"/> <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePage"/> <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisible"/> - <!-- Pre-condition 5- Expand the Content section > Insert Widget --> <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/> <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplay"/> - <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="selectCMSpageLinkFromDropdown"/> + <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="selectCMSPageLinkFromDropdown"/> <waitForPageLoad stepKey="waitForPageLoadPostSelectingFromDropDown"/> - <!-- Pre-condition 6 - 11 - Update the Anchor Custom Text --> <fillField selector="{{WidgetSection.InputAnchorCustomText}}" userInput="Custom texts' for tests" stepKey="InputValuesWithApostrophe"/> <click selector="{{WidgetSection.SelectPageButton}}" stepKey="clickOnSelectPageButton"/> - <waitForElementVisible selector="{{WidgetSection.url_key_selectPage}}" stepKey="waitForSelectPageDialogToPopulate"/> - <fillField selector="{{WidgetSection.url_key_selectPage}}" userInput="home" stepKey="EnterThePageURL"/> - <click selector="{{WidgetSection.SearchButton_selectPage}}" stepKey="clickOnSearchButton"/> + <waitForElementVisible selector="{{WidgetSection.URLKeySelectPage}}" stepKey="waitForSelectPageDialogToPopulate"/> + <fillField selector="{{WidgetSection.URLKeySelectPage}}" userInput="home" stepKey="EnterThePageURL"/> + <click selector="{{WidgetSection.SearchButtonSelectPage}}" stepKey="clickOnSearchButton"/> <waitForPageLoad stepKey="waitForResultsToBeDisplayed"/> - <click selector="{{WidgetSection.search_result_selectPage('home')}}" stepKey="clickOnDisplayedResult"/> + <click selector="{{WidgetSection.SearchResultSelectPage('home')}}" stepKey="clickOnDisplayedResult"/> <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidget"/> - <waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="waitForInsertWidgetDialogToDisappear" time="5"/> - <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePage"/> + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForInsertWidgetDialogToDisappear" time="5"/> + <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePage"/> <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOut" time="5"/> <see userInput="You saved the page." stepKey="seeSuccessMessage"/> - </before> <after> <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroupToReset"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFiltersToReset"/> <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescendingToReset"/> <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPageToReset" /> - <!-- Pre-condition 4- Update the page in grid To Reset--> <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEditedToReset"/> <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePageToReset"/> <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisibleToReset"/> - <!-- Pre-condition 5- Expand the Content section > Insert Widget To Reset --> <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPageToReset"/> <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplayToReset"/> <clearField selector="{{CmsNewPagePageContentSection.content}}" stepKey="clearWidgetTextFieldToReset"/> <fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="<p>CMS homepage content goes here.</p>" stepKey="InputDefaultValuesInWidgetTextFieldToReset"/> - <waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="waitForInsertWidgetDialogToDisappearToReset" time="5"/> - <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePageToReset"/> + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForInsertWidgetDialogToDisappearToReset" time="5"/> + <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePageToReset"/> <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOutToReset" time="5"/> <see userInput="You saved the page." stepKey="seeSuccessMessageToReset"/> <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> - <magentoCLI stepKey="reindex" command="indexer:reindex"/> - <magentoCLI stepKey="flushCache" command="cache:flush"/> + <magentoCLI stepKey="reindexPostEnablingThePageBuilder" command="indexer:reindex"/> + <magentoCLI stepKey="flushCachePostEnablingThePageBuilder" command="cache:flush"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToHomePage"/> <waitForPageLoad stepKey="waitToLoadHomePage"/> - <grabTextFrom selector="{{StorefrontCMSPageSection.widgetContent_Apostrophe('Custom texts')}}" stepKey="grabContentFromWidget"/> - + <grabTextFrom selector="{{StorefrontCMSPageSection.widgetContentApostrophe('Custom texts')}}" stepKey="grabContentFromWidget"/> <assertEquals message="Asserts the widget contains apostrophe On storefront" stepKey="assertApostropheOnWidgetText"> <expectedResult type="string">Custom texts' for tests</expectedResult> <actualResult type="string">{$grabContentFromWidget}</actualResult> From 5a876f199599f2a06573cef33a81466bc24627d4 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Mon, 17 Apr 2023 18:01:16 +0530 Subject: [PATCH 146/277] ACQE-4703: CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest code review implemented: updated the group pagebuilder-disable and removed the CLI commands --- ...sInTheTextFieldBoxWhileCreatingPageWidgetTest.xml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml index 8f9fcf68d8f42..f998f17276cfe 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -17,15 +17,11 @@ <severity value="MAJOR"/> <testCaseId value="AC-4389"/> <group value="widget"/> + <group value="pagebuilder-disable"/> </annotations> <before> <!-- Pre-condition 1- Login as Admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <!-- Pre-condition - Disable the page builder --> - <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> - <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> - <magentoCLI stepKey="reindexingPostDisablingThePageBuilder" command="indexer:reindex"/> - <magentoCLI stepKey="flushCachePostDisablingThePageBuilder" command="cache:flush"/> <!-- Pre-condition 3- Verify page in grid--> <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> @@ -37,6 +33,7 @@ <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisible"/> <!-- Pre-condition 5- Expand the Content section > Insert Widget --> <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/> + <conditionalClick selector="{{CmsNewPagePageActionsSection.showHideEditor}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="true" stepKey="clickOnShowHideEditorLinkIfVisibleForInsertingWidget"/> <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplay"/> <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="selectCMSPageLinkFromDropdown"/> <waitForPageLoad stepKey="waitForPageLoadPostSelectingFromDropDown"/> @@ -65,6 +62,7 @@ <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisibleToReset"/> <!-- Pre-condition 5- Expand the Content section > Insert Widget To Reset --> <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPageToReset"/> + <conditionalClick selector="{{CmsNewPagePageActionsSection.showHideEditor}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="true" stepKey="clickOnShowHideEditorLinkIfVisibleForInsertingWidgetToOriginal"/> <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplayToReset"/> <clearField selector="{{CmsNewPagePageContentSection.content}}" stepKey="clearWidgetTextFieldToReset"/> <fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="<p>CMS homepage content goes here.</p>" stepKey="InputDefaultValuesInWidgetTextFieldToReset"/> @@ -72,10 +70,6 @@ <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePageToReset"/> <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOutToReset" time="5"/> <see userInput="You saved the page." stepKey="seeSuccessMessageToReset"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> - <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> - <magentoCLI stepKey="reindexPostEnablingThePageBuilder" command="indexer:reindex"/> - <magentoCLI stepKey="flushCachePostEnablingThePageBuilder" command="cache:flush"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToHomePage"/> From 969de73339b9f2810b9b777898242e72c24dbe17 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Thu, 20 Apr 2023 13:57:06 +0530 Subject: [PATCH 147/277] ACQE-4703: [Test case sutomation] CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest -addressing code review: created the suite for taking care of disabling and enabling page builder for pre and post conditions --- ...fApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml index f998f17276cfe..82b43a0756e17 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest.xml @@ -17,7 +17,7 @@ <severity value="MAJOR"/> <testCaseId value="AC-4389"/> <group value="widget"/> - <group value="pagebuilder-disable"/> + <group value="pagebuilder_disabled"/> </annotations> <before> <!-- Pre-condition 1- Login as Admin --> From e0d113748015cdb6f0f2bbb1685d66b8c254f706 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 13 Apr 2023 13:26:04 +0530 Subject: [PATCH 148/277] ACQE-4652_1 --- .../Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml index c0927884bdd2b..7376976b12a50 100644 --- a/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml @@ -8,5 +8,6 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminNewWebsiteActionsSection"> <element name="saveWebsite" type="button" selector="#save" timeout="120"/> + <element name="setAsDefault" type="checkbox" selector=".//*[@name='website[is_default]']" timeout="120"/> </section> </sections> From c4f1a17f812ac00e4c77d5b04f656335e3714a1c Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Mon, 17 Apr 2023 17:04:16 +0530 Subject: [PATCH 149/277] Added wait after Reindex --- .../Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml index f4cad6590e1f6..091f5f8ef227f 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml @@ -200,5 +200,6 @@ <waitForPageLoad stepKey="waitForNewSimpleProductPage"/> <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessageThird"/> <magentoCron stepKey="runCronIndex" groups="index"/> + <waitForPageLoad stepKey="waitForPageLoadAfterReindex"/> </test> </tests> From 42733ae71b46d87901a6b54e8c8f00df72bf74da Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 20 Apr 2023 15:31:42 +0530 Subject: [PATCH 150/277] Updated StorefrontCheckoutWithSpecialPriceProductsTest --- .../Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml index 1a85bb0bee1ee..75b2d6f4c3b7c 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml @@ -101,6 +101,9 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!--Remove Filter--> + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductsGridFilters"/> + <waitForPageLoad stepKey="waitForClearProductsGridFilters"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> From 5139a8f7580c94af2f1ccab3850a7c3ad01791fb Mon Sep 17 00:00:00 2001 From: nithyaparamas <87164696+nithyaparamas@users.noreply.github.com> Date: Wed, 19 Apr 2023 14:13:44 +0530 Subject: [PATCH 151/277] Update AdminCmsPageGridUrlFilterApplierTest.xml AdminCmsPageGridUrlFilterApplierTest testFix AssertURL --- .../Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml index c7b3f7f27e946..539f82c7b0a6b 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml @@ -32,6 +32,7 @@ </after> <amOnPage url="{{CmsPagesPage.url}}?filters[title]=$$createPage.title$$" stepKey="navigateToPageGridWithFilters"/> <waitForPageLoad stepKey="waitForPageGrid"/> + <seeInCurrentUrl url="{{CmsPagesPage.url}}?filters[title]=$$createPage.title$$" stepKey="assertUrl"/> <waitForText selector="{{CmsPagesPageActionsSection.pagesGridRowByTitle($$createPage.title$$)}}" userInput="$$createPage.title$$" stepKey="seePage"/> <seeInCurrentUrl url="admin/cms/page?filters" stepKey="seeAdminCMSPageFilters"/> <waitForElementVisible selector="{{CmsPagesPageActionsSection.activeFilter}}" stepKey="seeEnabledFilters"/> From 3be1dc4e6e634055739ed492f338312c7af7360b Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Thu, 23 Mar 2023 12:48:26 +0530 Subject: [PATCH 152/277] AC-4267:Multishipping checkout with different product's types --- ...tionsForConfigurableProductActionGroup.xml | 49 +++ ...ishippingAddressAndItemUKGEActionGroup.xml | 32 ++ ...uctOfSpecificColorToTheCartActionGroup.xml | 33 ++ ...gAddressInBillingInfoStepGEActionGroup.xml | 28 ++ .../MultishippingSection.xml | 4 + ...hippingCheckoutAddressesToolbarSection.xml | 1 + ...ishippingCheckoutBillingToolbarSection.xml | 2 + ...ipmentCheckoutWithDifferentProductTest.xml | 394 ++++++++++++++++++ 8 files changed, 543 insertions(+) create mode 100644 app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml create mode 100644 app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml create mode 100644 app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup.xml create mode 100644 app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml create mode 100644 app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml new file mode 100644 index 0000000000000..728848973c786 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml @@ -0,0 +1,49 @@ +<?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="AdminCreateThreeConfigurationsForConfigurableProductActionGroup"> + <arguments> + <argument name="blueColor" type="string"/> + <argument name="whiteColor" type="string"/> + <argument name="redColor" type="string"/> + </arguments> + <conditionalClick selector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" dependentSelector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" visible="true" stepKey="expandProductInWebsites"/> + <checkOption selector="{{AdminProductGridSection.checkMainWebsite}}" stepKey="checkMainWebsite"/> + <scrollTo selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" x="-200" y="-200" stepKey="scrollToCreateConfigurationsButton"/> + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnTheCreateConfigurationsButton"/> + <waitForLoadingMaskToDisappear stepKey="waitPostClickingCreateConfigButton"/> + <click selector="{{AdminGridRow.checkboxByValue('color')}}" stepKey="selectColorAttributeCheckbox"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToAttributeValues"/> + + <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorWhite"/> + <fillField userInput="{{whiteColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameWhite"/> + <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveWhiteColor"/> + <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorBlue"/> + <fillField userInput="{{blueColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameBlue"/> + <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveBlueColor"/> + <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorRed"/> + <fillField userInput="{{redColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameRed"/> + <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveRedColor"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToBulkPricesAndImages"/> + + <click selector="{{AdminCreateProductConfigurationsPanel.applyUniquePricesByAttributeToEachSku}}" stepKey="clickOnApplyUniquePricesByAttributeToEachSku"/> + <selectOption selector="{{AdminCreateProductConfigurationsPanel.selectAttribute}}" userInput="Color" stepKey="selectColorAsAttribute"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(whiteColor)}}" userInput="30" stepKey="setQtyForWhiteProduct"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(redColor)}}" userInput="10" stepKey="setQtyForRedProduct"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(blueColor)}}" userInput="20" stepKey="setQtyForBlueProduct"/> + <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> + <fillField selector="{{AdminConfigurableProductAssignSourcesSlideOut.quantityPerSourceForSingleMode}}" userInput="100" stepKey="fillQuantityForCustomSource"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToSummaryStep"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnGenerateProducts"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveConfigurableProduct"/> + <conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="confirmDefaultAttributeSetForConfigurableProduct"/> + <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="checkProductSavedMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml new file mode 100644 index 0000000000000..1dcbb111b3284 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.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="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup"> + <annotations> + <description>Verify item information on Ship to Multiple Addresses page.</description> + </annotations> + <arguments> + <argument name="productSequenceNumber" type="string" defaultValue="1"/> + <argument name="addressQtySequenceNumber" type="string" defaultValue="1"/> + <argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/> + <argument name="quantity" type="string" defaultValue="1"/> + <argument name="firstName" type="string" defaultValue="{{US_Address_CA.firstname}}"/> + <argument name="lastName" type="string" defaultValue="{{US_Address_CA.lastname}}"/> + <argument name="city" type="string" defaultValue="{{US_Address_CA.city}}"/> + <argument name="postCode" type="string" defaultValue="{{US_Address_CA.postcode}}"/> + <argument name="country" type="string" defaultValue="{{US_Address_CA.country}}"/> + <argument name="addressStreetLine1" type="string" defaultValue="{{US_Address_CA.street[0]}}"/> + </arguments> + + <seeElement selector="{{MultishippingSection.productLink(productName, productSequenceNumber)}}" stepKey="verifyProductName"/> + <seeInField selector="{{MultishippingSection.productQty(addressQtySequenceNumber)}}" userInput="{{quantity}}" stepKey="verifyQuantity"/> + <seeInField selector="{{MultishippingSection.shippingAddressSelector(addressQtySequenceNumber)}}" userInput="{{firstName}} {{lastName}}, {{addressStreetLine1}}, {{city}}, {{postCode}}, {{country}}" stepKey="verifyAddress"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup.xml new file mode 100644 index 0000000000000..012648deae5e9 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup.xml @@ -0,0 +1,33 @@ +<?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="StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup"> + <annotations> + <description>Goes to the provided Storefront URL. Selects the provided Product Option under the Product Attribute. Fills in the provided Quantity. Clicks Add to Cart. Validates that the Success Message is present.</description> + </annotations> + <arguments> + <argument name="urlKey" type="string"/> + <argument name="color" type="string"/> + <argument name="qty" type="string"/> + </arguments> + + <amOnPage url="{{urlKey}}.html" stepKey="goToStorefrontPage"/> + <waitForPageLoad stepKey="waitForProductFrontPageToLoad"/> + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productOptionSelectByColor}}" stepKey="waitForOptions"/> + <selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelectByColor}}" userInput="{{color}}" stepKey="selectOption1"/> + <fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="{{qty}}" stepKey="fillProductQuantity"/> + <waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartDisabled}}" stepKey="waitForAddToCartButtonToRemoveDisabledState"/> + <waitForElementClickable selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/> + <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="clickOnAddToCartButton"/> + <waitForPageLoad stepKey="waitForProductToAddInCart"/> + <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/> + <seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeSuccessSaveMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml new file mode 100644 index 0000000000000..6dcb058234f46 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.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="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup"> + <annotations> + <description>Assert that Billing Address block contains provided Address data.</description> + </annotations> + <arguments> + <argument name="address" type="entity" defaultValue="DE_Address_Berlin_Not_Default_Address"/> + </arguments> + + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.firstname}}" stepKey="seeFirstname"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.lastname}}" stepKey="seeLastname"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.company}}" stepKey="seeCompany"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.street[0]}}" stepKey="seeStreet"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.city}}" stepKey="seeCity"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.postcode}}" stepKey="seePostcode"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.country}}" stepKey="seeCountry"/> + <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.telephone}}" stepKey="seeTelephone"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml index 304f0a9c7a12a..afb643ed5d737 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml @@ -18,5 +18,9 @@ <element name="productLink" type="button" selector="(//form[@id='checkout_multishipping_form']//a[contains(text(),'{{productName}}')])[{{sequenceNumber}}]" parameterized="true"/> <element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/> <element name="back" type="button" selector=".action.back"/> + <element name="addressSection" type="text" selector="//div[@class='block-title']/strong[text()='Address {{var}} ']" parameterized="true"/> + <element name="firstFlatRateCharge" type="text" selector="//span[@class='price' and text()='$10.00']/../../label[contains(text(),'Fixed')]"/> + <element name="secondFlatRateCharge" type="text" selector="//span[@class='price' and text()='$15.00']/../../label[contains(text(),'Fixed')]"/> + <element name="thirdFlatRateCharge" type="text" selector="//span[@class='price' and text()='$30.00']/../../label[contains(text(),'Fixed')]"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutAddressesToolbarSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutAddressesToolbarSection.xml index cf6bd10b0e8df..279967c2a3be0 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutAddressesToolbarSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutAddressesToolbarSection.xml @@ -17,6 +17,7 @@ <element name="checkmoneyorderonOverViewPage" type="text" selector="//dt[contains(text() , 'Check / Money order')]"/> <element name="othershippingitems" type="text" selector="//div[@class='block block-other']//div/strong[contains(text(),'Other items in your order')]/../..//div[2]//td/strong/a[contains(text(),'{{var}}')]" parameterized="true" /> <element name="shippingaddresstext" type="text" selector="//div[@class='box box-order-shipping-address']//span[contains(text(),'Shipping Address')]" /> + <element name="grandTotalAmount" type="text" selector="//div[@id='checkout-review-submit']/div[@class='grand totals']"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutBillingToolbarSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutBillingToolbarSection.xml index 6cfc09c1653fd..c2ae07b987976 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutBillingToolbarSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/StorefrontMultishippingCheckoutBillingToolbarSection.xml @@ -10,5 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="StorefrontMultishippingCheckoutBillingToolbarSection"> <element name="goToReviewOrder" type="button" selector="button.action.primary.continue"/> + <element name="changeBillingAddress" type="button" selector="//span[text()='Change']"/> + <element name="selectBillingAddress" type="button" selector="//a[text()='333-33-333-33']/../../..//span[text()='Select Address']"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml new file mode 100644 index 0000000000000..3291e7f59d2d7 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml @@ -0,0 +1,394 @@ +<?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="MultishipmentCheckoutWithDifferentProductTest"> + <annotations> + <features value="Multishipment"/> + <stories value="Multishipping checkout with different product's types"/> + <title value="Multishipping checkout with different product's types"/> + <description value="Multishipping checkout with different product's types"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4267"/> + <group value="Multishipment"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <createData entity="Customer_US_UK_DE" stepKey="createCustomer"/> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <!-- Create category and 2 simple product --> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="firstSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + <field key="price">10</field> + </createData> + <createData entity="ApiSimpleProduct" stepKey="secondSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + <field key="price">15</field> + </createData> + <!-- Create group product with created above simple products --> + <createData entity="ApiGroupedProduct2" stepKey="createGroupedProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="OneSimpleProductLink" stepKey="addFirstProduct"> + <requiredEntity createDataKey="createGroupedProduct"/> + <requiredEntity createDataKey="firstSimpleProduct"/> + </createData> + <updateData entity="OneMoreSimpleProductLink" createDataKey="addFirstProduct" stepKey="addSecondProduct"> + <requiredEntity createDataKey="createGroupedProduct"/> + <requiredEntity createDataKey="secondSimpleProduct"/> + </updateData> + <!--edit default quantity of each simple product under grouped product.--> + <amOnPage url="{{AdminProductEditPage.url($$createGroupedProduct.id$$)}}" stepKey="openGroupedProductEditPage"/> + <actionGroup ref="FillDefaultQuantityForLinkedToGroupProductInGridActionGroup" stepKey="fillDefaultQtyForVirtualProduct"> + <argument name="productName" value="$$firstSimpleProduct.name$$"/> + <argument name="qty" value="1"/> + </actionGroup> + <actionGroup ref="FillDefaultQuantityForLinkedToGroupProductInGridActionGroup" stepKey="fillDefaultQtyForSecondProduct"> + <argument name="productName" value="$$secondSimpleProduct.name$$"/> + <argument name="qty" value="2"/> + </actionGroup> + <actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseCreatedGroupedProduct"/> + <!-- Create Configurable Product --> + <createData entity="ApiConfigurableProduct" stepKey="createConfigurableProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!-- Search for the Created Configurable Product --> + <actionGroup ref="FilterAndSelectProductActionGroup" stepKey="openConfigurableProductForEdit"> + <argument name="productSku" value="$$createConfigurableProduct.sku$$"/> + </actionGroup> + <!--Update the Created Configurable Product --> + <actionGroup ref="AdminCreateThreeConfigurationsForConfigurableProductActionGroup" stepKey="editConfigurableProduct"> + <argument name="product" value="{{createConfigurableProduct}}"/> + <argument name="redColor" value="{{colorProductAttribute2.name}}"/> + <argument name="blueColor" value="{{colorProductAttribute3.name}}"/> + <argument name="whiteColor" value="{{colorProductAttribute1.name}}"/> + </actionGroup> + <!--Create bundle product with dynamic price with two simple products --> + <createData entity="ApiBundleProduct" stepKey="createDynamicBundleProduct"/> + <createData entity="DropDownBundleOption" stepKey="createFirstBundleOption"> + <requiredEntity createDataKey="createDynamicBundleProduct"/> + </createData> + <createData entity="ApiBundleLink" stepKey="firstLinkOptionToDynamicProduct"> + <requiredEntity createDataKey="createDynamicBundleProduct"/> + <requiredEntity createDataKey="createFirstBundleOption"/> + <requiredEntity createDataKey="firstSimpleProduct"/> + </createData> + <createData entity="ApiBundleLink" stepKey="secondLinkOptionToDynamicProduct"> + <requiredEntity createDataKey="createDynamicBundleProduct"/> + <requiredEntity createDataKey="createFirstBundleOption"/> + <requiredEntity createDataKey="secondSimpleProduct"/> + </createData> + <!--Assign bundle product to category--> + <amOnPage url="{{AdminProductEditPage.url($$createDynamicBundleProduct.id$$)}}" stepKey="openBundleProductEditPage"/> + <actionGroup ref="AdminAssignCategoryToProductAndSaveActionGroup" stepKey="assignCategoryToProduct"> + <argument name="categoryName" value="$createCategory.name$"/> + </actionGroup> + </before> + <after> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearGridFilters"/> + <actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="deleteAllProducts"/> + + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!-- Delete the Created Color attribute--> + <actionGroup ref="AdminDeleteCreatedColorSpecificAttributeActionGroup" stepKey="deleteWhiteColorAttribute"> + <argument name="Color" value="{{colorProductAttribute1.name}}"/> + </actionGroup> + <actionGroup ref="AdminDeleteCreatedColorSpecificAttributeActionGroup" stepKey="deleteRedColorAttribute"> + <argument name="Color" value="{{colorProductAttribute2.name}}"/> + </actionGroup> + <actionGroup ref="AdminDeleteCreatedColorSpecificAttributeActionGroup" stepKey="deleteBlueColorAttribute"> + <argument name="Color" value="{{colorProductAttribute3.name}}"/> + </actionGroup> + <!-- Admin logout --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addFirstSimpleProductToCart"> + <argument name="product" value="$$firstSimpleProduct$$"/> + </actionGroup> + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSecondSimpleProductToCart"> + <argument name="product" value="$$secondSimpleProduct$$"/> + </actionGroup> + <!-- Add grouped product to shopping cart --> + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addGroupedProductToCart"> + <argument name="product" value="$$createGroupedProduct$$"/> + </actionGroup> + <!-- goto Bundle Product Page--> + <amOnPage url="{{StorefrontProductPage.url($createDynamicBundleProduct.custom_attributes[url_key]$)}}" stepKey="navigateToBundleProduct"/> + <!-- Add Bundle first Product to Cart --> + <actionGroup ref="StorefrontAddBundleProductToTheCartActionGroup" stepKey="addFirstBundleProductToCart"> + <argument name="productName" value="$firstSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + </actionGroup> + <!-- Add Bundle second Product to Cart --> + <actionGroup ref="StorefrontAddBundleProductToTheCartActionGroup" stepKey="addSecondBundleProductToCart"> + <argument name="productName" value="$secondSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + </actionGroup> + <!--Add different configurable product to cart.--> + <actionGroup ref="StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup" stepKey="addRedConfigurableProductToCart"> + <argument name="urlKey" value="$createConfigurableProduct.custom_attributes[url_key]$" /> + <argument name="color" value="Red"/> + <argument name="qty" value="1"/> + </actionGroup> + <actionGroup ref="StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup" stepKey="addBlueConfigurableProductToCart"> + <argument name="urlKey" value="$createConfigurableProduct.custom_attributes[url_key]$" /> + <argument name="color" value="Blue"/> + <argument name="qty" value="3"/> + </actionGroup> + <!--verify total product quantity in minicart.--> + <seeElement selector="{{StorefrontMinicartSection.quantity(11)}}" stepKey="seeAddedProductQuantityInMiniCart"/> + <!-- Go to Shopping Cart page --> + <actionGroup ref="clickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/> + <!-- Link "Check Out with Multiple Addresses" is shown --> + <seeLink userInput="Check Out with Multiple Addresses" stepKey="seeLinkIsPresent"/> + <!-- Click Check Out with Multiple Addresses --> + <actionGroup ref="StorefrontCheckoutWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/> + <!-- Check Ship to Multiple Address Page is opened--> + <waitForPageLoad stepKey="waitForAddressPage"/> + <seeInCurrentUrl url="{{MultishippingCheckoutAddressesPage.url}}" stepKey="seeShipToMultipleAddressesPageIsOpened"/> + <!--select different address To Ship for different products--> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectFirstAddressFromThreeOption"> + <argument name="sequenceNumber" value="1"/> + <argument name="option" value="John Doe, 368 Broadway St. 113, New York, New York 10001, United States"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectSecondAddressFromThreeOption"> + <argument name="sequenceNumber" value="2"/> + <argument name="option" value="Jane Doe, 172, Westminster Bridge Rd, London, SE1 7RW, United Kingdom"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectThirdAddressFromThreeOption"> + <argument name="sequenceNumber" value="3"/> + <argument name="option" value="John Doe, 368 Broadway St. 113, New York, New York 10001, United States"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectFourthAddressFromThreeOption"> + <argument name="sequenceNumber" value="4"/> + <argument name="option" value="Jane Doe, 172, Westminster Bridge Rd, London, SE1 7RW, United Kingdom"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectFifthAddressFromThreeOption"> + <argument name="sequenceNumber" value="5"/> + <argument name="option" value="Jane Doe, 172, Westminster Bridge Rd, London, SE1 7RW, United Kingdom"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectSixthAddressFromThreeOption"> + <argument name="sequenceNumber" value="6"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectSeventhAddressFromThreeOption"> + <argument name="sequenceNumber" value="7"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectEighthAddressFromThreeOption"> + <argument name="sequenceNumber" value="8"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectNinthAddressFromThreeOption"> + <argument name="sequenceNumber" value="9"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectTenthAddressFromThreeOption"> + <argument name="sequenceNumber" value="10"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> + </actionGroup> + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectEleventhAddressFromThree"> + <argument name="sequenceNumber" value="11"/> + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> + </actionGroup> + <click selector="{{SingleShippingSection.updateAddress}}" stepKey="clickOnUpdateAddress"/> + <waitForPageLoad time="30" stepKey="waitForShippingInformationAfterUpdated"/> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemActionGroup" stepKey="verifyFirstLineAllDetails"> + <argument name="sequenceNumber" value="1"/> + <argument name="productName" value="$firstSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="{{US_Address_NY.firstname}}"/> + <argument name="lastName" value="{{US_Address_NY.lastname}}"/> + <argument name="city" value="{{US_Address_NY.city}}"/> + <argument name="state" value="{{US_Address_NY.state}}"/> + <argument name="postCode" value="{{US_Address_NY.postcode}}"/> + <argument name="country" value="{{US_Address_NY.country}}"/> + <argument name="addressStreetLine1" value="{{US_Address_NY.street[0]}}"/> + <argument name="addressStreetLine2" value="{{US_Address_NY.street[1]}}"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemActionGroup" stepKey="verifySecondLineQtyAllDetails"> + <argument name="sequenceNumber" value="2"/> + <argument name="productName" value="$firstSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="{{US_Address_NY.firstname}}"/> + <argument name="lastName" value="{{US_Address_NY.lastname}}"/> + <argument name="city" value="{{US_Address_NY.city}}"/> + <argument name="state" value="{{US_Address_NY.state}}"/> + <argument name="postCode" value="{{US_Address_NY.postcode}}"/> + <argument name="country" value="{{US_Address_NY.country}}"/> + <argument name="addressStreetLine1" value="{{US_Address_NY.street[0]}}"/> + <argument name="addressStreetLine2" value="{{US_Address_NY.street[1]}}"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyThirdLineAllDetails"> + <argument name="productSequenceNumber" value="1"/> + <argument name="addressQtySequenceNumber" value="3"/> + <argument name="productName" value="$secondSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="Jane"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="London"/> + <argument name="postCode" value="SE1 7RW"/> + <argument name="country" value="United Kingdom"/> + <argument name="addressStreetLine1" value="172, Westminster Bridge Rd"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyFourthLineAllDetails"> + <argument name="productSequenceNumber" value="2"/> + <argument name="addressQtySequenceNumber" value="4"/> + <argument name="productName" value="$secondSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="Jane"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="London"/> + <argument name="postCode" value="SE1 7RW"/> + <argument name="country" value="United Kingdom"/> + <argument name="addressStreetLine1" value="172, Westminster Bridge Rd"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyFifthLineAllDetails"> + <argument name="productSequenceNumber" value="3"/> + <argument name="addressQtySequenceNumber" value="5"/> + <argument name="productName" value="$secondSimpleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="Jane"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="London"/> + <argument name="postCode" value="SE1 7RW"/> + <argument name="country" value="United Kingdom"/> + <argument name="addressStreetLine1" value="172, Westminster Bridge Rd"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifySixthLineAllDetails"> + <argument name="productSequenceNumber" value="1"/> + <argument name="addressQtySequenceNumber" value="6"/> + <argument name="productName" value="$createDynamicBundleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="John"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="Berlin"/> + <argument name="postCode" value="10789"/> + <argument name="country" value="Germany"/> + <argument name="addressStreetLine1" value="Augsburger Strabe 41"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifySeventhLineAllDetails"> + <argument name="productSequenceNumber" value="2"/> + <argument name="addressQtySequenceNumber" value="7"/> + <argument name="productName" value="$createDynamicBundleProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="John"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="Berlin"/> + <argument name="postCode" value="10789"/> + <argument name="country" value="Germany"/> + <argument name="addressStreetLine1" value="Augsburger Strabe 41"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyEighthLineAllDetails"> + <argument name="productSequenceNumber" value="1"/> + <argument name="addressQtySequenceNumber" value="8"/> + <argument name="productName" value="$createConfigurableProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="John"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="Berlin"/> + <argument name="postCode" value="10789"/> + <argument name="country" value="Germany"/> + <argument name="addressStreetLine1" value="Augsburger Strabe 41"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyNinthLineAllDetails"> + <argument name="productSequenceNumber" value="2"/> + <argument name="addressQtySequenceNumber" value="9"/> + <argument name="productName" value="$createConfigurableProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="John"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="Berlin"/> + <argument name="postCode" value="10789"/> + <argument name="country" value="Germany"/> + <argument name="addressStreetLine1" value="Augsburger Strabe 41"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyTenthLineAllDetails"> + <argument name="productSequenceNumber" value="3"/> + <argument name="addressQtySequenceNumber" value="10"/> + <argument name="productName" value="$createConfigurableProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="John"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="Berlin"/> + <argument name="postCode" value="10789"/> + <argument name="country" value="Germany"/> + <argument name="addressStreetLine1" value="Augsburger Strabe 41"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" stepKey="verifyEleventhLineAllDetails"> + <argument name="productSequenceNumber" value="4"/> + <argument name="addressQtySequenceNumber" value="11"/> + <argument name="productName" value="$createConfigurableProduct.name$"/> + <argument name="quantity" value="1"/> + <argument name="firstName" value="John"/> + <argument name="lastName" value="Doe"/> + <argument name="city" value="{{DE_Address_Berlin_Not_Default_Address.city}}"/> + <argument name="postCode" value="10789"/> + <argument name="country" value="Germany"/> + <argument name="addressStreetLine1" value="Augsburger Strabe 41"/> + </actionGroup> + <actionGroup ref="StorefrontSaveAddressActionGroup" stepKey="saveAddresses"/> + <!--verify multishipment all three section--> + <seeElement selector="{{MultishippingSection.addressSection('1')}}" stepKey="firstAddressSection"/> + <seeElement selector="{{MultishippingSection.addressSection('2')}}" stepKey="secondAddressSection"/> + <seeElement selector="{{MultishippingSection.addressSection('3')}}" stepKey="thirdAddressSection"/> + <!--verify flat rate charge for all three section--> + <seeElement selector="{{MultishippingSection.firstFlatRateCharge}}" stepKey="verifyFirstFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.secondFlatRateCharge}}" stepKey="verifySecondFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.thirdFlatRateCharge}}" stepKey="verifyThirdFlatRateAmount"/> + <!-- Click On Continue to Billing--> + <click selector="{{StorefrontMultishippingCheckoutShippingToolbarSection.continueToBilling}}" stepKey="clickContinueToBilling"/> + <waitForPageLoad stepKey="waitForCheckoutShippingToolbarPageLoad"/> + <!-- See Billing Information Page is opened--> + <seeInCurrentUrl url="{{MultishippingCheckoutBillingPage.url}}" stepKey="seeBillingPageIsOpened"/> + <!-- click on change billing address button --> + <click selector="{{StorefrontMultishippingCheckoutBillingToolbarSection.changeBillingAddress}}" stepKey="clickChangeBillingAddressButton"/> + <!-- select new billing address--> + <click selector="{{StorefrontMultishippingCheckoutBillingToolbarSection.selectBillingAddress}}" stepKey="selectBillingAddress"/> + <wait stepKey="waitForPaymentPageToLoad" time="10"/> + <!-- Page contains Payment Method --> + <seeElement selector="{{StorefrontMultishippingCheckoutAddressesToolbarSection.checkmoneyorder}}" stepKey="CheckMoney"/> + <!-- Select Payment method "Check / Money Order --> + <conditionalClick selector="{{StorefrontMultishippingCheckoutAddressesToolbarSection.checkmoneyorder}}" dependentSelector="{{StorefrontMultishippingCheckoutAddressesToolbarSection.checkmoneyorder}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> + <!-- Select Payment method e.g. "Check / Money Order" and click Go to Review Your Order --> + <waitForElement selector="{{StorefrontMultishippingCheckoutBillingToolbarSection.goToReviewOrder}}" stepKey="waitForElementgoToReviewOrder"/> + <click selector="{{StorefrontMultishippingCheckoutBillingToolbarSection.goToReviewOrder}}" stepKey="clickGoToReviewOrder"/> + <!-- See Order review Page is opened--> + <seeInCurrentUrl url="{{MultishippingCheckoutOverviewPage.url}}" stepKey="seeMultishipingCheckoutOverviewPageIsOpened"/> + <!-- Check Page contains customer's billing address on OverViewPage--> + <actionGroup ref="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup" stepKey="assertCustomerBillingInformationOverViewPage"/> + <!-- Check Payment Method on OverViewPage--> + <seeElement selector="{{StorefrontMultishippingCheckoutAddressesToolbarSection.checkmoneyorderonOverViewPage}}" stepKey="seeCheckMoneyorderonOverViewPage"/> + <!--Check total amount --> + <see selector="{{StorefrontMultishippingCheckoutAddressesToolbarSection.grandTotalAmount}}" userInput="Grand Total: $215.00" stepKey="seeGrandTotalAmount"/> + <!-- Click 'Place Order' --> + <actionGroup ref="PlaceOrderActionGroup" stepKey="placeOrder"/> + <!--Check Thank you for your purchase!" page is opened --> + <see selector="{{StorefrontMultipleShippingMethodSection.successMessage}}" userInput="Successfully ordered" stepKey="seeSuccessMessage"/> + <!--Grab Order ID of placed all 3 order --> + <grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('1')}}" stepKey="grabFirstOrderId"/> + <grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('2')}}" stepKey="grabSecondOrderId"/> + <grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('3')}}" stepKey="grabThirdOrderId"/> + <!-- Go to My Account > My Orders and verify orderId--> + <amOnPage url="{{StorefrontCustomerOrdersHistoryPage.url}}" stepKey="goToMyOrdersPage"/> + <waitForPageLoad stepKey="waitForMyOrdersPageLoad"/> + <seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabFirstOrderId})}}" stepKey="seeFirstOrder"/> + <seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabSecondOrderId})}}" stepKey="seeSecondOrder"/> + <seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabThirdOrderId})}}" stepKey="seeThirdOrder"/> + <!-- Logout customer --> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> + </test> +</tests> From 0b5d35560e99975225eeaff0a176c6013b1c7549 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Thu, 23 Mar 2023 17:54:15 +0530 Subject: [PATCH 153/277] added missing action group --- ...eatedColorSpecificAttributeActionGroup.xml | 29 +++++++++++++++++++ .../Section/AdminColorGridBodySection.xml | 15 ++++++++++ 2 files changed, 44 insertions(+) create mode 100644 app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml create mode 100644 app/code/Magento/Multishipping/Test/Mftf/Section/AdminColorGridBodySection.xml diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml new file mode 100644 index 0000000000000..00b5e7a1bb432 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.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="AdminDeleteCreatedColorSpecificAttributeActionGroup" > + <annotations> + <description>Delete the created new colors in color attribute</description> + </annotations> + <arguments> + <argument name="Color" 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="Color" stepKey="setAttributeCode"/> + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/> + <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + <click selector="{{AdminColorGridBodySection.deleteSpecificColorAttribute(Color)}}" stepKey="deleteColor"/> + <waitForPageLoad stepKey="waitForPageLoad3"/> + <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveTheDeletedColor"/> + <see userInput="You saved the product attribute." stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/AdminColorGridBodySection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/AdminColorGridBodySection.xml new file mode 100644 index 0000000000000..81bdbbba89e7b --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/AdminColorGridBodySection.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="AdminColorGridBodySection"> + <element name="deleteColor" type="button" selector="//td//button[@class='action- scalable delete delete-option']/../..//td//input[@value='{{var}}']" parameterized="true"/> + <element name="deleteSpecificColorAttribute" type="button" selector="//input[@value='{{var}}']/../..//button[@class='action- scalable delete delete-option']" parameterized="true"/> + </section> +</sections> From 67b05380c2438e8005ee8ec42b6764cd1734e1ce Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Thu, 23 Mar 2023 19:21:41 +0530 Subject: [PATCH 154/277] added missing action element --- .../Test/Mftf/Section/StorefrontProductInfoMainSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml index 5ec949332a36b..370487075c3c0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -30,6 +30,7 @@ <element name="productOptionAreaInput" type="textarea" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//textarea" parameterized="true"/> <element name="productOptionFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'OptionFile')]/../div[@class='control']//input[@type='file']" parameterized="true"/> <element name="productOptionSelect" type="select" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//select" parameterized="true"/> + <element name="productOptionSelectByColor" type="select" selector=".//option[text()='Choose an Option...']/../../select" /> <element name="asLowAs" type="input" selector="span[class='price-wrapper '] "/> <element name="asLowAsLabel" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][1]"/> <element name="asLowAsLabelAgain" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][2]"/> From d7afa2313f944d1bf849a8820f127b17739e7092 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 27 Mar 2023 12:26:57 +0530 Subject: [PATCH 155/277] code fix for flaky test AddNewProductAttributeInProductPageTest --- .../Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml index 32a5a485263a4..d170e60438589 100755 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddNewProductAttributeInProductPageTest.xml @@ -100,7 +100,8 @@ <!--Click on Go Back button --> <click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackToGridSimple"/> - + <!--Clear filter if available --> + <conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="{{AdminGridFilterControls.clearAll}}" visible="true" stepKey="clearTheFiltersIfPresent"/> <!-- Select created attribute as an column --> <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openColumnsDropdown"/> <actionGroup ref="CheckAdminProductGridColumnOptionActionGroup" stepKey="checkCreatedAttributeColumn"> From e013310ed488eabd1af403cdde32484c34773de4 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Wed, 12 Apr 2023 17:42:33 +0530 Subject: [PATCH 156/277] placing action group and section in catalog module --- .../AdminDeleteCreatedColorSpecificAttributeActionGroup.xml | 0 .../Test/Mftf/Section/AdminColorGridBodySection.xml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename app/code/Magento/{Multishipping => Catalog}/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml (100%) rename app/code/Magento/{Multishipping => Catalog}/Test/Mftf/Section/AdminColorGridBodySection.xml (100%) diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml similarity index 100% rename from app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/AdminColorGridBodySection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminColorGridBodySection.xml similarity index 100% rename from app/code/Magento/Multishipping/Test/Mftf/Section/AdminColorGridBodySection.xml rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminColorGridBodySection.xml From ccff810b95fdeb5aebac4e9f6e990ec4ef55e0d8 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Thu, 13 Apr 2023 16:54:11 +0530 Subject: [PATCH 157/277] implemented review comment as element parameterized --- ...teCreatedColorSpecificAttributeActionGroup.xml | 2 +- .../Mftf/Section/AdminColorGridBodySection.xml | 15 --------------- .../Section/AdminProductAttributeGridSection.xml | 1 + .../MultishippingSection/MultishippingSection.xml | 4 +--- ...tishipmentCheckoutWithDifferentProductTest.xml | 6 +++--- 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 app/code/Magento/Catalog/Test/Mftf/Section/AdminColorGridBodySection.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml index 00b5e7a1bb432..2907f88446ec2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminDeleteCreatedColorSpecificAttributeActionGroup.xml @@ -21,7 +21,7 @@ <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/> <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/> <waitForPageLoad stepKey="waitForPageLoad2"/> - <click selector="{{AdminColorGridBodySection.deleteSpecificColorAttribute(Color)}}" stepKey="deleteColor"/> + <click selector="{{AdminProductAttributeGridSection.deleteSpecificColorAttribute(Color)}}" stepKey="deleteColor"/> <waitForPageLoad stepKey="waitForPageLoad3"/> <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveTheDeletedColor"/> <see userInput="You saved the product attribute." stepKey="seeSuccessMessage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminColorGridBodySection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminColorGridBodySection.xml deleted file mode 100644 index 81bdbbba89e7b..0000000000000 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminColorGridBodySection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?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="AdminColorGridBodySection"> - <element name="deleteColor" type="button" selector="//td//button[@class='action- scalable delete delete-option']/../..//td//input[@value='{{var}}']" parameterized="true"/> - <element name="deleteSpecificColorAttribute" type="button" selector="//input[@value='{{var}}']/../..//button[@class='action- scalable delete delete-option']" parameterized="true"/> - </section> -</sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml index 455cde4c1d70c..8e2877b47b64a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml @@ -24,6 +24,7 @@ <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"/> + <element name="deleteSpecificColorAttribute" type="button" selector="//input[@value='{{var}}']/../..//button[@class='action- scalable delete delete-option']" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml index afb643ed5d737..a1d7f69293c90 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml @@ -19,8 +19,6 @@ <element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/> <element name="back" type="button" selector=".action.back"/> <element name="addressSection" type="text" selector="//div[@class='block-title']/strong[text()='Address {{var}} ']" parameterized="true"/> - <element name="firstFlatRateCharge" type="text" selector="//span[@class='price' and text()='$10.00']/../../label[contains(text(),'Fixed')]"/> - <element name="secondFlatRateCharge" type="text" selector="//span[@class='price' and text()='$15.00']/../../label[contains(text(),'Fixed')]"/> - <element name="thirdFlatRateCharge" type="text" selector="//span[@class='price' and text()='$30.00']/../../label[contains(text(),'Fixed')]"/> + <element name="FlatRateCharge" type="text" selector="//span[@class='price' and text()='${{price}}']/../../label[contains(text(),'Fixed')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml index 3291e7f59d2d7..4b55498dfc1f3 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml @@ -346,9 +346,9 @@ <seeElement selector="{{MultishippingSection.addressSection('2')}}" stepKey="secondAddressSection"/> <seeElement selector="{{MultishippingSection.addressSection('3')}}" stepKey="thirdAddressSection"/> <!--verify flat rate charge for all three section--> - <seeElement selector="{{MultishippingSection.firstFlatRateCharge}}" stepKey="verifyFirstFlatRateAmount"/> - <seeElement selector="{{MultishippingSection.secondFlatRateCharge}}" stepKey="verifySecondFlatRateAmount"/> - <seeElement selector="{{MultishippingSection.thirdFlatRateCharge}}" stepKey="verifyThirdFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.FlatRateCharge('10.00')}}" stepKey="verifyFirstFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.FlatRateCharge('15.00')}}" stepKey="verifySecondFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.FlatRateCharge('30.00')}}" stepKey="verifyThirdFlatRateAmount"/> <!-- Click On Continue to Billing--> <click selector="{{StorefrontMultishippingCheckoutShippingToolbarSection.continueToBilling}}" stepKey="clickContinueToBilling"/> <waitForPageLoad stepKey="waitForCheckoutShippingToolbarPageLoad"/> From 4077dae5680f66ae70dd478c391c4c7b09390907 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 17 Apr 2023 19:49:00 +0530 Subject: [PATCH 158/277] remove duplicate action group --- ...tionsForConfigurableProductActionGroup.xml | 49 ------------------- .../MultishippingSection.xml | 2 +- ...ipmentCheckoutWithDifferentProductTest.xml | 6 +-- 3 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml deleted file mode 100644 index 728848973c786..0000000000000 --- a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminCreateThreeConfigurationsForConfigurableProductActionGroup.xml +++ /dev/null @@ -1,49 +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="AdminCreateThreeConfigurationsForConfigurableProductActionGroup"> - <arguments> - <argument name="blueColor" type="string"/> - <argument name="whiteColor" type="string"/> - <argument name="redColor" type="string"/> - </arguments> - <conditionalClick selector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" dependentSelector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" visible="true" stepKey="expandProductInWebsites"/> - <checkOption selector="{{AdminProductGridSection.checkMainWebsite}}" stepKey="checkMainWebsite"/> - <scrollTo selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" x="-200" y="-200" stepKey="scrollToCreateConfigurationsButton"/> - <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnTheCreateConfigurationsButton"/> - <waitForLoadingMaskToDisappear stepKey="waitPostClickingCreateConfigButton"/> - <click selector="{{AdminGridRow.checkboxByValue('color')}}" stepKey="selectColorAttributeCheckbox"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToAttributeValues"/> - - <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorWhite"/> - <fillField userInput="{{whiteColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameWhite"/> - <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveWhiteColor"/> - <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorBlue"/> - <fillField userInput="{{blueColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameBlue"/> - <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveBlueColor"/> - <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorRed"/> - <fillField userInput="{{redColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameRed"/> - <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveRedColor"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToBulkPricesAndImages"/> - - <click selector="{{AdminCreateProductConfigurationsPanel.applyUniquePricesByAttributeToEachSku}}" stepKey="clickOnApplyUniquePricesByAttributeToEachSku"/> - <selectOption selector="{{AdminCreateProductConfigurationsPanel.selectAttribute}}" userInput="Color" stepKey="selectColorAsAttribute"/> - <fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(whiteColor)}}" userInput="30" stepKey="setQtyForWhiteProduct"/> - <fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(redColor)}}" userInput="10" stepKey="setQtyForRedProduct"/> - <fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(blueColor)}}" userInput="20" stepKey="setQtyForBlueProduct"/> - <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> - <fillField selector="{{AdminConfigurableProductAssignSourcesSlideOut.quantityPerSourceForSingleMode}}" userInput="100" stepKey="fillQuantityForCustomSource"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToSummaryStep"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnGenerateProducts"/> - <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveConfigurableProduct"/> - <conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="confirmDefaultAttributeSetForConfigurableProduct"/> - <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="checkProductSavedMessage"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml index a1d7f69293c90..e4ba74479892c 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml @@ -19,6 +19,6 @@ <element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/> <element name="back" type="button" selector=".action.back"/> <element name="addressSection" type="text" selector="//div[@class='block-title']/strong[text()='Address {{var}} ']" parameterized="true"/> - <element name="FlatRateCharge" type="text" selector="//span[@class='price' and text()='${{price}}']/../../label[contains(text(),'Fixed')]" parameterized="true"/> + <element name="flatRateCharge" type="text" selector="//span[@class='price' and text()='${{price}}']/../../label[contains(text(),'Fixed')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml index 4b55498dfc1f3..77cf1b4aeb80f 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml @@ -346,9 +346,9 @@ <seeElement selector="{{MultishippingSection.addressSection('2')}}" stepKey="secondAddressSection"/> <seeElement selector="{{MultishippingSection.addressSection('3')}}" stepKey="thirdAddressSection"/> <!--verify flat rate charge for all three section--> - <seeElement selector="{{MultishippingSection.FlatRateCharge('10.00')}}" stepKey="verifyFirstFlatRateAmount"/> - <seeElement selector="{{MultishippingSection.FlatRateCharge('15.00')}}" stepKey="verifySecondFlatRateAmount"/> - <seeElement selector="{{MultishippingSection.FlatRateCharge('30.00')}}" stepKey="verifyThirdFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.flatRateCharge('10.00')}}" stepKey="verifyFirstFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.flatRateCharge('15.00')}}" stepKey="verifySecondFlatRateAmount"/> + <seeElement selector="{{MultishippingSection.flatRateCharge('30.00')}}" stepKey="verifyThirdFlatRateAmount"/> <!-- Click On Continue to Billing--> <click selector="{{StorefrontMultishippingCheckoutShippingToolbarSection.continueToBilling}}" stepKey="clickContinueToBilling"/> <waitForPageLoad stepKey="waitForCheckoutShippingToolbarPageLoad"/> From 7f72008a04d4e93d668534791af688db38a6fb25 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Wed, 19 Apr 2023 18:34:16 +0530 Subject: [PATCH 159/277] extented action group --- ...ishippingAddressAndItemUKGEActionGroup.xml | 19 ++++--------------- ...gAddressInBillingInfoStepGEActionGroup.xml | 17 +++-------------- ...ipmentCheckoutWithDifferentProductTest.xml | 5 +++-- 3 files changed, 10 insertions(+), 31 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml index 1dcbb111b3284..a31fc9a0e02fb 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultishippingAddressAndItemUKGEActionGroup.xml @@ -8,25 +8,14 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup"> + <actionGroup name="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup" extends="AssertStorefrontMultishippingAddressAndItemActionGroup"> <annotations> - <description>Verify item information on Ship to Multiple Addresses page.</description> + <description>Verify item information on Ship to Multiple Addresses page for UK and Germany.</description> </annotations> <arguments> - <argument name="productSequenceNumber" type="string" defaultValue="1"/> <argument name="addressQtySequenceNumber" type="string" defaultValue="1"/> - <argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/> - <argument name="quantity" type="string" defaultValue="1"/> - <argument name="firstName" type="string" defaultValue="{{US_Address_CA.firstname}}"/> - <argument name="lastName" type="string" defaultValue="{{US_Address_CA.lastname}}"/> - <argument name="city" type="string" defaultValue="{{US_Address_CA.city}}"/> - <argument name="postCode" type="string" defaultValue="{{US_Address_CA.postcode}}"/> - <argument name="country" type="string" defaultValue="{{US_Address_CA.country}}"/> - <argument name="addressStreetLine1" type="string" defaultValue="{{US_Address_CA.street[0]}}"/> </arguments> - - <seeElement selector="{{MultishippingSection.productLink(productName, productSequenceNumber)}}" stepKey="verifyProductName"/> - <seeInField selector="{{MultishippingSection.productQty(addressQtySequenceNumber)}}" userInput="{{quantity}}" stepKey="verifyQuantity"/> - <seeInField selector="{{MultishippingSection.shippingAddressSelector(addressQtySequenceNumber)}}" userInput="{{firstName}} {{lastName}}, {{addressStreetLine1}}, {{city}}, {{postCode}}, {{country}}" stepKey="verifyAddress"/> + <remove keyForRemoval="verifyAddress"/> + <seeInField selector="{{MultishippingSection.shippingAddressSelector(addressQtySequenceNumber)}}" userInput="{{firstName}} {{lastName}}, {{addressStreetLine1}}, {{city}}, {{postCode}}, {{country}}" stepKey="verifyAddressDetails"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml index 6dcb058234f46..c401098a07943 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup.xml @@ -8,21 +8,10 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup"> + <actionGroup name="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup" extends="StorefrontAssertBillingAddressInBillingInfoStepActionGroup"> <annotations> - <description>Assert that Billing Address block contains provided Address data.</description> + <description>Assert that Billing Address block contains provided Address data for Germany.</description> </annotations> - <arguments> - <argument name="address" type="entity" defaultValue="DE_Address_Berlin_Not_Default_Address"/> - </arguments> - - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.firstname}}" stepKey="seeFirstname"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.lastname}}" stepKey="seeLastname"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.company}}" stepKey="seeCompany"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.street[0]}}" stepKey="seeStreet"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.city}}" stepKey="seeCity"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.postcode}}" stepKey="seePostcode"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.country}}" stepKey="seeCountry"/> - <see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.telephone}}" stepKey="seeTelephone"/> + <remove keyForRemoval="seeState"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml index 77cf1b4aeb80f..cb09866438a79 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/MultishipmentCheckoutWithDifferentProductTest.xml @@ -22,7 +22,6 @@ <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <createData entity="Customer_US_UK_DE" stepKey="createCustomer"/> - <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <!-- Create category and 2 simple product --> <createData entity="ApiCategory" stepKey="createCategory"/> <createData entity="ApiSimpleProduct" stepKey="firstSimpleProduct"> @@ -369,7 +368,9 @@ <!-- See Order review Page is opened--> <seeInCurrentUrl url="{{MultishippingCheckoutOverviewPage.url}}" stepKey="seeMultishipingCheckoutOverviewPageIsOpened"/> <!-- Check Page contains customer's billing address on OverViewPage--> - <actionGroup ref="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup" stepKey="assertCustomerBillingInformationOverViewPage"/> + <actionGroup ref="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup" stepKey="assertCustomerBillingInformationOverViewPage"> + <argument name="address" value="DE_Address_Berlin_Not_Default_Address"/> + </actionGroup> <!-- Check Payment Method on OverViewPage--> <seeElement selector="{{StorefrontMultishippingCheckoutAddressesToolbarSection.checkmoneyorderonOverViewPage}}" stepKey="seeCheckMoneyorderonOverViewPage"/> <!--Check total amount --> From 67da3168229d8acca52b3b982920deb6b5fb4142 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 20 Apr 2023 13:14:19 +0530 Subject: [PATCH 160/277] ACQE-4207:Splitted from ACQE-4290 --- ...PayPalPaymentAccountTwoStepActionGroup.xml | 4 +- ...tAnOrderUsingPaypalExpressCheckoutTest.xml | 76 +++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 app/code/Magento/Paypal/Test/Mftf/Test/EnablePaypalExpressCheckoutAndSubmitAnOrderUsingPaypalExpressCheckoutTest.xml diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml index a2c7b7d82a349..0a1077e0c18eb 100644 --- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml @@ -19,11 +19,11 @@ <conditionalClick selector="{{PayPalPaymentSection.existingAccountLoginBtn}}" dependentSelector="{{PayPalPaymentSection.existingAccountLoginBtn}}" visible="true" stepKey="skipAccountCreationAndLogin"/> <waitForPageLoad stepKey="waitForLoginPageLoad"/> <waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" /> - <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/> + <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/> <click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/> <waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/> <click selector="{{PayPalPaymentSection.password}}" stepKey="focusOnPasswordField"/> - <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/> + <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/> <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/> <waitForPageLoad stepKey="wait"/> </actionGroup> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/EnablePaypalExpressCheckoutAndSubmitAnOrderUsingPaypalExpressCheckoutTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/EnablePaypalExpressCheckoutAndSubmitAnOrderUsingPaypalExpressCheckoutTest.xml new file mode 100644 index 0000000000000..42606464c4a9d --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Test/EnablePaypalExpressCheckoutAndSubmitAnOrderUsingPaypalExpressCheckoutTest.xml @@ -0,0 +1,76 @@ +<?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="EnablePaypalExpressCheckoutAndSubmitAnOrderUsingPaypalExpressCheckoutTest"> + <annotations> + <features value="PayPal"/> + <stories value="Enable paypal express checkout and validate the customer checkout payment works with paypal express"/> + <title value="Enable paypal express checkout and validate the customer checkout payment works with paypal express"/> + <description value="Enable paypal express checkout and validate the customer checkout payment works with paypal express"/> + <severity value="MAJOR"/> + <testCaseId value="AC-6951"/> + </annotations> + <before> + <!--Enable free shipping method --> + <magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!-- New Customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"> + <field key="firstname">John1</field> + <field key="lastname">Doe1</field> + </createData> + <createData entity="SimpleProduct2" stepKey="simpleProduct"> + <field key="price">1</field> + </createData> + <actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress"> + <argument name="credentials" value="SamplePaypalExpressConfig2"/> + </actionGroup> + </before> + <after> + <magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/> + <magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/> + <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/> + <magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"> + <argument name="product" value="$simpleProduct$"/> + </actionGroup> + <!--Go to cart page--> + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="gotoCart"/> + <!-- Click on Paypal paypal button--> + <actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"> + <argument name="elementNumber" value="1"/> + </actionGroup> + <!--Login to Paypal in-context--> + <actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal"/> + <!--Transfer Cart Line and Shipping Method assertion--> + <actionGroup ref="PayPalAssertTransferLineAndShippingMethodNotExistActionGroup" stepKey="assertPayPalSettings"/> + <!--Click PayPal button and go back to Magento site--> + <actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="goBackToMagentoSite"/> + <actionGroup ref="StorefrontSelectShippingMethodOnOrderReviewPageActionGroup" stepKey="selectShippingMethod"> + <argument name="shippingMethod" value="Free - $0.00"/> + </actionGroup> + <actionGroup ref="StorefrontPlaceOrderOnOrderReviewPageActionGroup" stepKey="clickPlaceOrderBtn"/> + <!-- I see order successful Page instead of Order Review Page --> + <actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertCheckoutSuccess"/> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> + <!--Go to Admin and check order information--> + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid"> + <argument name="orderId" value="$grabOrderNumber"/> + </actionGroup> + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> + <actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelOrder"/> + </test> +</tests> From 453faf6325a6e4f48eaa42f7441830a35dfd3abf Mon Sep 17 00:00:00 2001 From: Devika-GL <devika.badhe@globallogic.com> Date: Fri, 28 Apr 2023 12:53:50 +0530 Subject: [PATCH 161/277] AC-8110: USPS Shipping Method Configuration Fix --- .../Usps/Model/Config/Backend/UspsUrl.php | 76 +++++++++++ .../Unit/Model/Config/Backend/UspsUrlTest.php | 124 ++++++++++++++++++ .../Magento/Usps/etc/adminhtml/system.xml | 2 + app/code/Magento/Usps/i18n/en_US.csv | 1 + 4 files changed, 203 insertions(+) create mode 100644 app/code/Magento/Usps/Model/Config/Backend/UspsUrl.php create mode 100644 app/code/Magento/Usps/Test/Unit/Model/Config/Backend/UspsUrlTest.php diff --git a/app/code/Magento/Usps/Model/Config/Backend/UspsUrl.php b/app/code/Magento/Usps/Model/Config/Backend/UspsUrl.php new file mode 100644 index 0000000000000..17cdcc83961bd --- /dev/null +++ b/app/code/Magento/Usps/Model/Config/Backend/UspsUrl.php @@ -0,0 +1,76 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Usps\Model\Config\Backend; + +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\Config\Value; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\Model\Context; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; +use Magento\Framework\Validator\Url; + +/** + * Represents a config URL that may point to a USPS endpoint + * + * @SuppressWarnings(PHPMD.Superglobals) + */ +class UspsUrl extends Value +{ + /** + * @var Url + */ + private Url $url; + + /** + * @param Context $context + * @param Registry $registry + * @param ScopeConfigInterface $config + * @param TypeListInterface $cacheTypeList + * @param Url $url + * @param AbstractResource|null $resource + * @param AbstractDb|null $resourceCollection + * @param array $data + */ + public function __construct( + Context $context, + Registry $registry, + ScopeConfigInterface $config, + TypeListInterface $cacheTypeList, + Url $url, + AbstractResource $resource = null, + AbstractDb $resourceCollection = null, + array $data = [] + ) { + $this->url = $url; + parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); + } + + /** + * @inheritdoc + * + * @throws ValidatorException + */ + public function beforeSave() + { + $isValid = $this->url->isValid($this->getValue()); + if ($isValid) { + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $host = parse_url((string)$this->getValue(), \PHP_URL_HOST); + + if (!empty($host) && !preg_match("/(?:.+\.|^)usps|shippingapis\.com$/i", $host)) { + throw new ValidatorException(__('USPS API endpoint URL\'s must use usps.com or shippingapis.com')); + } + } + + return parent::beforeSave(); + } +} diff --git a/app/code/Magento/Usps/Test/Unit/Model/Config/Backend/UspsUrlTest.php b/app/code/Magento/Usps/Test/Unit/Model/Config/Backend/UspsUrlTest.php new file mode 100644 index 0000000000000..da18923366c55 --- /dev/null +++ b/app/code/Magento/Usps/Test/Unit/Model/Config/Backend/UspsUrlTest.php @@ -0,0 +1,124 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Usps\Test\Unit\Model\Config\Backend; + +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\Exception\ValidatorException; +use Magento\Framework\Model\Context; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\Validator\Url; +use Magento\Usps\Model\Config\Backend\UspsUrl; +use PHPUnit\Framework\TestCase; + +/** + * Verify behavior of UspsUrl backend type + * + * @SuppressWarnings(PHPMD.Superglobals) + */ +class UspsUrlTest extends TestCase +{ + /** + * @var UspsUrl + */ + private $urlConfig; + + /** + * @var Url + */ + private $url; + + /** + * @var Context + */ + private $contextMock; + + protected function setUp(): void + { + $objectManager = new ObjectManager($this); + + $this->contextMock = $this->createMock(Context::class); + $registry = $this->createMock(Registry::class); + $config = $this->createMock(ScopeConfigInterface::class); + $cacheTypeList = $this->createMock(TypeListInterface::class); + $this->url = $this->createMock(Url::class); + $resource = $this->createMock(AbstractResource::class); + $resourceCollection = $this->createMock(AbstractDb::class); + $eventManagerMock = $this->getMockForAbstractClass(ManagerInterface::class); + + $eventManagerMock->expects($this->any())->method('dispatch'); + $this->contextMock->expects($this->any())->method('getEventDispatcher')->willReturn($eventManagerMock); + + $this->urlConfig = $objectManager->getObject( + UspsUrl::class, + [ + 'url' => $this->url, + 'context' => $this->contextMock, + 'registry' => $registry, + 'config' => $config, + 'cacheTypeList' => $cacheTypeList, + 'resource' => $resource, + 'resourceCollection' => $resourceCollection, + ] + ); + } + + /** + * @dataProvider validDataProvider + * @param string $data The valid data + * @throws ValidatorException + */ + public function testBeforeSave(string $data = ""): void + { + $this->url->expects($this->any())->method('isValid')->willReturn(true); + $this->urlConfig->setValue($data); + $this->urlConfig->beforeSave(); + $this->assertTrue($this->url->isValid($data)); + } + + /** + * @dataProvider invalidDataProvider + * @param string $data The invalid data + */ + public function testBeforeSaveErrors(string $data): void + { + $this->url->expects($this->any())->method('isValid')->willReturn(true); + $this->expectException('Magento\Framework\Exception\ValidatorException'); + $this->expectExceptionMessage('USPS API endpoint URL\'s must use usps.com or shippingapis.com'); + $this->urlConfig->setValue($data); + $this->urlConfig->beforeSave(); + } + + public function validDataProvider(): array + { + return [ + [], + [''], + ['http://usps.com'], + ['https://foo.usps.com'], + ['http://foo.usps.com/foo/bar?baz=bash&fizz=buzz'], + ]; + } + + /** + * @return string[][] + */ + public function invalidDataProvider(): array + { + return [ + ['https://shippingapis.com.fake.com'], + ['https://shippingapis.info'], + ['http://shippingapis.com.foo.com/foo/bar?baz=bash&fizz=buzz'], + ]; + } +} diff --git a/app/code/Magento/Usps/etc/adminhtml/system.xml b/app/code/Magento/Usps/etc/adminhtml/system.xml index b01f7be9a19f9..00c9632b99367 100644 --- a/app/code/Magento/Usps/etc/adminhtml/system.xml +++ b/app/code/Magento/Usps/etc/adminhtml/system.xml @@ -16,9 +16,11 @@ </field> <field id="gateway_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" canRestore="1"> <label>Gateway URL</label> + <backend_model>Magento\Usps\Model\Config\Backend\UspsUrl</backend_model> </field> <field id="gateway_secure_url" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" canRestore="1"> <label>Secure Gateway URL</label> + <backend_model>Magento\Usps\Model\Config\Backend\UspsUrl</backend_model> </field> <field id="title" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Title</label> diff --git a/app/code/Magento/Usps/i18n/en_US.csv b/app/code/Magento/Usps/i18n/en_US.csv index ab1a11155fe04..65837cfb4dc77 100644 --- a/app/code/Magento/Usps/i18n/en_US.csv +++ b/app/code/Magento/Usps/i18n/en_US.csv @@ -137,3 +137,4 @@ Machinable,Machinable Debug,Debug "Show Method if Not Applicable","Show Method if Not Applicable" "Sort Order","Sort Order" +"USPS API endpoint URL\'s must use usps.com or shippingapis.com","USPS API endpoint URL\'s must use usps.com or shippingapis.com" From 657b746c27b051af05b3af0149903448a16793e4 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Sat, 29 Apr 2023 15:59:12 +0530 Subject: [PATCH 162/277] AC-8385: MFTF Test Fix --- .../Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php | 1 - 1 file changed, 1 deletion(-) 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 42f7f56e387b3..b1978964d0d4d 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,7 +7,6 @@ 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; From 03aec796e0ec0e99ee84cf0f7a28b7c99daa37d3 Mon Sep 17 00:00:00 2001 From: Rizwan Khan <glo52257@adobe.com> Date: Sun, 30 Apr 2023 12:31:20 +0530 Subject: [PATCH 163/277] AC-8601: MFTF Test Fix --- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index 188555174a05e..f8e7141b3bb00 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -133,9 +133,8 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI { //validate guest cart address if ($address->getId() !== null) { - $size = $cart->getAddressesCollection()->getSize(); - $old = $cart->getAddressesCollection()->getItemById($address->getId()); - if ($old === null && $size > 0) { + $old = $cart->getAddressById($address->getId()); + if ($old === false) { throw new NoSuchEntityException( __('Invalid quote address id %1', $address->getId()) ); From 1d4b0757c75cda0baf5f6fec230abeb16cb6693a Mon Sep 17 00:00:00 2001 From: Rizwan Khan <glo52257@adobe.com> Date: Sun, 30 Apr 2023 12:32:27 +0530 Subject: [PATCH 164/277] Revert "AC-8601: MFTF Test Fix" This reverts commit 03aec796e0ec0e99ee84cf0f7a28b7c99daa37d3. --- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index f8e7141b3bb00..188555174a05e 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -133,8 +133,9 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI { //validate guest cart address if ($address->getId() !== null) { - $old = $cart->getAddressById($address->getId()); - if ($old === false) { + $size = $cart->getAddressesCollection()->getSize(); + $old = $cart->getAddressesCollection()->getItemById($address->getId()); + if ($old === null && $size > 0) { throw new NoSuchEntityException( __('Invalid quote address id %1', $address->getId()) ); From f4c3cdc28dcdf95b3693de5f22629cd9f28a40a3 Mon Sep 17 00:00:00 2001 From: Rizwan Khan <glo52257@adobe.com> Date: Sun, 30 Apr 2023 12:38:23 +0530 Subject: [PATCH 165/277] AC-8601: MFTF Test Fix --- app/code/Magento/Quote/Model/QuoteAddressValidator.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php index 188555174a05e..f8e7141b3bb00 100644 --- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php +++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php @@ -133,9 +133,8 @@ private function doValidateForGuestQuoteAddress(AddressInterface $address, CartI { //validate guest cart address if ($address->getId() !== null) { - $size = $cart->getAddressesCollection()->getSize(); - $old = $cart->getAddressesCollection()->getItemById($address->getId()); - if ($old === null && $size > 0) { + $old = $cart->getAddressById($address->getId()); + if ($old === false) { throw new NoSuchEntityException( __('Invalid quote address id %1', $address->getId()) ); From db4eebfc73f426d22771a12516a593f82e3c0814 Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Mon, 1 May 2023 09:06:00 +0530 Subject: [PATCH 166/277] AC-8385: MFTF Test Fix --- .../Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php | 1 + 1 file changed, 1 insertion(+) 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 b1978964d0d4d..42f7f56e387b3 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; From 324b31f318482a453d432d317c3f33caeee82c0b Mon Sep 17 00:00:00 2001 From: "Pawan.kumar" <pawan.kumar9@globallogic.com> Date: Tue, 2 May 2023 21:43:52 +0530 Subject: [PATCH 167/277] AC-8654: Fix Use Statement --- .../Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php | 1 - 1 file changed, 1 deletion(-) 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 42f7f56e387b3..b1978964d0d4d 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,7 +7,6 @@ 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; From ffa3773cfea2a3cf44c940e6a361b0f40ce68864 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Wed, 3 May 2023 18:51:16 +0530 Subject: [PATCH 168/277] Added files --- ...ntDeleteStoredPaymentMethodActionGroup.xml | 26 +++++ ...ontCustomerStoredPaymentMethodsSection.xml | 4 + ...inPayPalPayflowProWithValutActionGroup.xml | 34 ++++++ .../PayPalPayflowProConfigSection.xml | 21 ++++ ...owProCreditCardFromCustomerAccountTest.xml | 105 ++++++++++++++++++ 5 files changed, 190 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontDeleteStoredPaymentMethodActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Test/DeleteSavedWithPayflowProCreditCardFromCustomerAccountTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontDeleteStoredPaymentMethodActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontDeleteStoredPaymentMethodActionGroup.xml new file mode 100644 index 0000000000000..567122c45317e --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontDeleteStoredPaymentMethodActionGroup.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="StorefrontDeleteStoredPaymentMethodActionGroup"> + <annotations> + <description>Goes to the Stored Payment Method and delete the 2nd card</description> + </annotations> + <arguments> + <argument name="card" type="entity" defaultValue="StoredPaymentMethods"/> + </arguments> + + <click selector="{{StorefrontCustomerStoredPaymentMethodsSection.deleteBtn(card.cardExpire)}}" stepKey="clickOnDelete"/> + <waitForElementVisible selector="{{StorefrontCustomerStoredPaymentMethodsSection.deleteMessage}}" stepKey="waitForMessageToVisible"/> + <seeElement selector="{{StorefrontCustomerStoredPaymentMethodsSection.deleteMessage}}" stepKey="seeDeleteConfirmationMessage1"/> + <click selector="{{StorefrontCustomerStoredPaymentMethodsSection.delete}}" stepKey="clickOnDeleteInAlert"/> + <waitForPageLoad stepKey="waitForCustomersGridIsLoaded"/> + <see selector="{{StorefrontCustomerStoredPaymentMethodsSection.successMessage}}" userInput="Stored Payment Method was successfully removed" stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerStoredPaymentMethodsSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerStoredPaymentMethodsSection.xml index d6b586e42f28c..ba8159948701d 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerStoredPaymentMethodsSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerStoredPaymentMethodsSection.xml @@ -11,5 +11,9 @@ <section name="StorefrontCustomerStoredPaymentMethodsSection"> <element name="cardNumber" type="text" selector="td.card-number"/> <element name="expirationDate" type="text" selector="td.card-expire"/> + <element name="deleteBtn" type="button" selector=".//*[contains(text(),'{{var1}}')]/../td[@class='col actions']//button" parameterized="true"/> + <element name="delete" type="button" selector="(//*[@class='action primary']/span)[2]"/> + <element name="deleteMessage" type="text" selector="//div[@class='modal-content']//div[text()='Are you sure you want to delete this card: 0002?']"/> + <element name="successMessage" type="text" selector=".//*[@class='message-success success message']/div"/> </section> </sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml new file mode 100644 index 0000000000000..4e85d4a051c71 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml @@ -0,0 +1,34 @@ +<?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="AdminPayPalPayflowProWithValutActionGroup"> + <annotations> + <description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description> + </annotations> + <arguments> + <argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/> + <argument name="countryCode" type="string" defaultValue="us"/> + </arguments> + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> + <waitForPageLoad stepKey="waitForConfigPageLoad"/> + <scrollTo selector="{{PayPalPayflowProConfigSection.paymentGateway(countryCode)}}" stepKey="scrollToConfigure"/> + <click selector ="{{PayPalPayflowProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/> + <scrollTo selector="{{PayPalPayflowProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/> + <fillField selector ="{{PayPalPayflowProConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentspro_parner}}" stepKey="inputPartner"/> + <fillField selector ="{{PayPalPayflowProConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentspro_user}}" stepKey="inputUser"/> + <fillField selector ="{{PayPalPayflowProConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentspro_vendor}}" stepKey="inputVendor"/> + <fillField selector ="{{PayPalPayflowProConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentspro_password}}" stepKey="inputPassword"/> + <selectOption selector="{{PayPalPayflowProConfigSection.testmode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/> + <selectOption selector ="{{PayPalPayflowProConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/> + <selectOption selector ="{{PayPalPayflowProConfigSection.enableVault(countryCode)}}" userInput="Yes" stepKey="enableSolutionValut"/> + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> + <waitForPageLoad stepKey="waitForSaving"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml new file mode 100644 index 0000000000000..ae2d84c6b027d --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml @@ -0,0 +1,21 @@ +<?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="PayPalPayflowProConfigSection"> + <element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout-head" parameterized="true"/> + <element name="partner" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_partner" parameterized="true"/> + <element name="user" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_user" parameterized="true"/> + <element name="vendor" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_vendor" parameterized="true"/> + <element name="password" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_pwd" parameterized="true"/> + <element name="testmode" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_sandbox_flag" parameterized="true"/> + <element name="enableSolution" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/> + <element name="enableVault" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_payflowpro_cc_vault_active" parameterized="true"/> + <element name="paymentGateway" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways-head" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/DeleteSavedWithPayflowProCreditCardFromCustomerAccountTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/DeleteSavedWithPayflowProCreditCardFromCustomerAccountTest.xml new file mode 100644 index 0000000000000..5fc0469a1b096 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Test/DeleteSavedWithPayflowProCreditCardFromCustomerAccountTest.xml @@ -0,0 +1,105 @@ +<?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="DeleteSavedWithPayflowProCreditCardFromCustomerAccountTest"> + <annotations> + <stories value="Stored Payment Method"/> + <title value="Delete saved with Payflow Pro credit card from customer account"/> + <description value="Delete saved with Payflow Pro credit card from customer account"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4838"/> + <group value="paypal"/> + </annotations> + <before> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminPayPalPayflowProWithValutActionGroup" stepKey="ConfigPayPalExpress"> + <argument name="credentials" value="SamplePaypalPaymentsProConfig"/> + </actionGroup> + </before> + <after> + <createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <!-- Login as Customer --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> + <!-- Add product 1 to cart --> + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> + <argument name="productName" value="$createSimpleProduct1.name$"/> + </actionGroup> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> + <!-- Select shipping --> + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> + <argument name="shippingMethodName" value="Flat Rate"/> + </actionGroup> + <!-- Go to Order review --> + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> + <!-- Checkout select Credit Card (Payflow Pro) and place order--> + <waitForPageLoad stepKey="waitForLoadingMask"/> + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> + <!--Fill Card Data --> + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> + <argument name="cardData" value="VisaDefaultCard"/> + </actionGroup> + <waitForPageLoad stepKey="waitForFillCardData"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> + <!-- 2nd time order--> + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront2"/> + <!-- Add product 1 to cart --> + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage2"> + <argument name="productName" value="$createSimpleProduct1.name$"/> + </actionGroup> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/> + <!-- Select shipping --> + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate2"> + <argument name="shippingMethodName" value="Flat Rate"/> + </actionGroup> + <!-- Go to Order review --> + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage2"/> + <!-- Checkout select Credit Card (Payflow Pro) and place order--> + <waitForPageLoad stepKey="waitForLoadingMask2ndTime"/> + <waitForPageLoad stepKey="waitForPaymentPageLoad2ndTime"/> + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod2"/> + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection2"/> + <!--Fill Card Data --> + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal2"> + <argument name="cardData" value="Visa3DSecureCard"/> + </actionGroup> + <waitForPageLoad stepKey="waitForFillCardData2ndTime"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder2"/> + <!-- Go to My Account --> + <!-- Open My Account > Stored Payment Methods --> + <amOnPage stepKey="goToMyAccountPage" url="{{StorefrontCustomerDashboardPage.url}}"/> + <waitForPageLoad stepKey="waitForSideBarPageLoad2ndTime"/> + <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu2"> + <argument name="menu" value="Stored Payment Methods"/> + </actionGroup> + <!-- Assert Card number that ends with 1111 and exp Date--> + <actionGroup ref="AssertStorefrontCustomerSavedCardActionGroup" stepKey="assertCustomerPaymentMethod"> + <argument name="card" value="VisaDefaultCardInfo"/> + </actionGroup> + <!-- Assert Card number that ends with 0002 and exp Date--> + <actionGroup ref="AssertStorefrontCustomerSavedCardActionGroup" stepKey="assertCustomerPaymentMethod2"> + <argument name="card" value="Visa3DSecureCardInfo"/> + </actionGroup> + <!-- Delete second card--> + <actionGroup ref="StorefrontDeleteStoredPaymentMethodActionGroup" stepKey="deleteStoredCard"> + <argument name="card" value="Visa3DSecureCardInfo"/> + </actionGroup> + </test> +</tests> From e4b180f991df3ffb11f3534abb3d05b94fa5c73a Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 4 May 2023 10:04:08 +0530 Subject: [PATCH 169/277] Added data file. --- app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml index 95e69cf6e93cf..fa557a12a3bee 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml @@ -223,4 +223,10 @@ <data key="paypal_express_api_signature">AFcWxV21C7fd0v3bYYYRCpSSRl31AqoP3QLd.JUUpDPuPpQIgT0-m401</data> <data key="paypal_express_merchantID">54Z2EE6T7PRB4</data> </entity> + <entity name="SamplePaypalPaymentsProConfig" type="paypal_paymentspro_config"> + <data key="paypal_paymentspro_parner">PayPal</data> + <data key="paypal_paymentspro_user">MksGLTest</data> + <data key="paypal_paymentspro_vendor">MksGLTest</data> + <data key="paypal_paymentspro_password">Abcd@123</data> + </entity> </entities> From bb7c2cdd0f24088b1be3af3291ec44d1b4301480 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 4 May 2023 13:59:07 +0530 Subject: [PATCH 170/277] Added code to expand other payment config --- .../ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml index 4e85d4a051c71..f03365bd697f4 100644 --- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml @@ -18,6 +18,7 @@ </arguments> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> <waitForPageLoad stepKey="waitForConfigPageLoad"/> + <click selector ="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="expandOtherPaypalConfigButton"/> <scrollTo selector="{{PayPalPayflowProConfigSection.paymentGateway(countryCode)}}" stepKey="scrollToConfigure"/> <click selector ="{{PayPalPayflowProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/> <scrollTo selector="{{PayPalPayflowProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/> From 28868cf40a9c05c22d81f1b9c26cfcec68bb719f Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Fri, 5 May 2023 15:44:01 +0530 Subject: [PATCH 171/277] Updated Exp card details --- app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml index fa557a12a3bee..4e88bbe73e2e6 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml @@ -214,7 +214,7 @@ </entity> <entity name="VisaDefaultCardInfo"> <data key="cardNumberEnding">1111</data> - <data key="cardExpire">01/2030</data> + <data key="cardExpire">1/2030</data> </entity> <entity name="SamplePaypalExpressConfig2" type="paypal_express_config"> <data key="paypal_express_email">rlus_1349181941_biz@ebay.com</data> From f22a81b11ef6170fee57190518dbc8afbdb591d0 Mon Sep 17 00:00:00 2001 From: Aparna Sreekumar <glo80326@adobe.com> Date: Sat, 6 May 2023 17:19:23 +0530 Subject: [PATCH 172/277] BUG#AC-8227:Tax Class set to None when creating new configurable variations in multi store mode --- .../Magento/Catalog/Model/ProductRepository.php | 14 +++++++++++--- .../Model/Product/VariationHandler.php | 9 ++++----- .../Model/Product/VariationHandlerTest.php | 16 ++++++++++++++-- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php index 5cf4ac1e64242..571a63b098676 100644 --- a/app/code/Magento/Catalog/Model/ProductRepository.php +++ b/app/code/Magento/Catalog/Model/ProductRepository.php @@ -130,14 +130,14 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa /** * @deprecated 103.0.2 - * + * @see MAGETWO-71174 * @var ImageContentInterfaceFactory */ protected $contentFactory; /** * @deprecated 103.0.2 - * + * @see MAGETWO-71174 * @var ImageProcessorInterface */ protected $imageProcessor; @@ -149,7 +149,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa /** * @deprecated 103.0.2 - * + * @see MAGETWO-71174 * @var \Magento\Catalog\Model\Product\Gallery\Processor */ protected $mediaGalleryProcessor; @@ -322,6 +322,12 @@ public function getById($productId, $editMode = false, $storeId = null, $forceRe $product->setData('store_id', $storeId); } $product->load($productId); + foreach ($product->getAttributes() as $attributeKey => $attributeValue) { + $defaultValue = $attributeValue->getDefaultValue(); + if (!$product->hasData($attributeKey) && $defaultValue) { + $product->setData($attributeKey, $defaultValue); + } + } if (!$product->getId()) { throw new NoSuchEntityException( __("The product that was requested doesn't exist. Verify the product and try again.") @@ -736,6 +742,7 @@ private function addExtensionAttributes(Collection $collection) : Collection * Helper function that adds a FilterGroup to the collection. * * @deprecated 102.0.0 + * @see MAGETWO-71174 * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup * @param Collection $collection * @return void @@ -795,6 +802,7 @@ private function getMediaGalleryProcessor() * Retrieve collection processor * * @deprecated 102.0.0 + * @see MAGETWO-71174 * @return CollectionProcessorInterface */ private function getCollectionProcessor() diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php b/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php index 36b5c204897c0..64c86976c05bb 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php @@ -200,9 +200,11 @@ protected function fillSimpleProductData( continue; } - $product->setData($attribute->getAttributeCode(), $parentProduct->getData($attribute->getAttributeCode())); + $product->setData( + $attribute->getAttributeCode(), + $parentProduct->getData($attribute->getAttributeCode()) ?? $attribute->getDefaultValue() + ); } - $keysFilter = ['item_id', 'product_id', 'stock_id', 'type_id', 'website_id']; $postData['stock_data'] = array_diff_key((array)$parentProduct->getStockData(), array_flip($keysFilter)); $stockStatus = $parentProduct->getQuantityAndStockStatus(); @@ -212,9 +214,6 @@ protected function fillSimpleProductData( $postData = $this->processMediaGallery($product, $postData); $postData['status'] = $postData['status'] ?? Status::STATUS_ENABLED; - $defaultTaxClassId = isset($this->attributes['tax_class_id']) ? - $this->attributes['tax_class_id']->getDefaultValue() : null; - $postData['tax_class_id'] = $postData['tax_class_id'] ?? $parentProduct->getTaxClassId() ?? $defaultTaxClassId; $product->addData( $postData )->setWebsiteIds( diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php index 655576491c533..958f6da93e071 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/VariationHandlerTest.php @@ -73,7 +73,6 @@ public function testGenerateSimpleProducts(array $productsData): void ->setSmallImage('some_test_image.jpg') ->setThumbnail('some_test_image.jpg') ->setSwatchImage('some_test_image.jpg') - ->setTaxClassId(2) ->setNewVariationsAttributeSetId($this->product->getDefaultAttributeSetId()); $generatedProducts = $this->variationHandler->generateSimpleProducts($this->product, $productsData); $this->assertCount(3, $generatedProducts); @@ -89,7 +88,6 @@ public function testGenerateSimpleProducts(array $productsData): void $this->assertNull($product->getSmallImage()); $this->assertNull($product->getThumbnail()); $this->assertNull($product->getSwatchImage()); - $this->assertEquals(2, $product->getTaxClassId()); } } @@ -111,6 +109,20 @@ public function testGenerateSimpleProductsWithPartialData(array $productsData): } } + /** + * @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php + * @dataProvider generateSimpleProductsWithPartialDataDataProvider + * @param array $productsData + * @return void + */ + public function testGeneratedSimpleProductInheritTaxClassFromParent(array $productsData): void + { + $this->product->setTaxClassId(2); + $generatedProduct = $this->variationHandler->generateSimpleProducts($this->product, $productsData); + $product = $this->productRepository->getById(reset($generatedProduct)); + $this->assertEquals(2, $product->getTaxClassId()); + } + /** * @return array */ From b388e2ab8708728d9da766a550831f46e244adbb Mon Sep 17 00:00:00 2001 From: Aparna Sreekumar <glo80326@adobe.com> Date: Sun, 7 May 2023 12:14:11 +0530 Subject: [PATCH 173/277] BUG#AC-8227:Tax Class set to None when creating new configurable variations in multi store mode --- .../Magento/Catalog/Model/ProductRepository.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php index 571a63b098676..5cf4ac1e64242 100644 --- a/app/code/Magento/Catalog/Model/ProductRepository.php +++ b/app/code/Magento/Catalog/Model/ProductRepository.php @@ -130,14 +130,14 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa /** * @deprecated 103.0.2 - * @see MAGETWO-71174 + * * @var ImageContentInterfaceFactory */ protected $contentFactory; /** * @deprecated 103.0.2 - * @see MAGETWO-71174 + * * @var ImageProcessorInterface */ protected $imageProcessor; @@ -149,7 +149,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa /** * @deprecated 103.0.2 - * @see MAGETWO-71174 + * * @var \Magento\Catalog\Model\Product\Gallery\Processor */ protected $mediaGalleryProcessor; @@ -322,12 +322,6 @@ public function getById($productId, $editMode = false, $storeId = null, $forceRe $product->setData('store_id', $storeId); } $product->load($productId); - foreach ($product->getAttributes() as $attributeKey => $attributeValue) { - $defaultValue = $attributeValue->getDefaultValue(); - if (!$product->hasData($attributeKey) && $defaultValue) { - $product->setData($attributeKey, $defaultValue); - } - } if (!$product->getId()) { throw new NoSuchEntityException( __("The product that was requested doesn't exist. Verify the product and try again.") @@ -742,7 +736,6 @@ private function addExtensionAttributes(Collection $collection) : Collection * Helper function that adds a FilterGroup to the collection. * * @deprecated 102.0.0 - * @see MAGETWO-71174 * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup * @param Collection $collection * @return void @@ -802,7 +795,6 @@ private function getMediaGalleryProcessor() * Retrieve collection processor * * @deprecated 102.0.0 - * @see MAGETWO-71174 * @return CollectionProcessorInterface */ private function getCollectionProcessor() From 4f604e195732979f85ef21878d8cf0dce487926f Mon Sep 17 00:00:00 2001 From: glo85530 <92149622+glo85530@users.noreply.github.com> Date: Mon, 8 May 2023 12:16:19 +0530 Subject: [PATCH 174/277] Delete OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml The test has been moved to inventory repo as per the comments provided from Kevin and Alex --- ...tockAsNoOnTestStockAndMainWebsitesTest.xml | 112 ------------------ 1 file changed, 112 deletions(-) delete mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml deleted file mode 100644 index 20c4e8011a685..0000000000000 --- a/app/code/Magento/Catalog/Test/Mftf/Test/OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest.xml +++ /dev/null @@ -1,112 +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="OnlyXleftNotDisplayedForSimpleProductWithMangeStockAsNoOnTestStockAndMainWebsitesTest"> - <annotations> - <features value="Inventory"/> - <title value="Only X left is not displayed for Simple product with 'Mange Stock' = 'No' on Test stock and Main website"/> - <stories value="Only X left is not displayed for Simple product with 'Mange Stock' = 'No' on Test stock and Main website"/> - <description value="Only X left is not displayed for Simple product with 'Mange Stock' = 'No' on Test stock and Main website"/> - <testCaseId value="AC-6506"/> - <severity value="CRITICAL"/> - </annotations> - <before> - <!-- Step1: Login as Admin --> - <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> - <!-- Disable all sources and delete any pre-existing stocks --> - <actionGroup ref="DisableAllSourcesActionGroup" stepKey="DisableAllSources"/> - <actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteToDefaultStock"> - <argument name="stockName" value="{{_defaultStock.name}}"/> - <argument name="websiteName" value="{{_defaultWebsite.name}}"/> - </actionGroup> - <magentoCLI command="config:set cataloginventory/options/stock_threshold_qty 5" stepKey="setStockThresholdValueTo5"/> - <magentoCLI stepKey="reindexPostSettingTheMainWebsiteToDefaultStock" command="indexer:reindex"/> - <magentoCLI stepKey="flushCachePostSettingTheMainWebsiteToDefaultStock" command="cache:flush"/> - </before> - <after> - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="DisableSourceActionGroup" stepKey="disableCreatedSource"> - <argument name="sourceCode" value="$$createSource.source[source_code]$$"/> - </actionGroup> - <actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteBackToDefaultStock"> - <argument name="stockName" value="{{_defaultStock.name}}"/> - <argument name="websiteName" value="{{_defaultWebsite.name}}"/> - </actionGroup> - <deleteData createDataKey="createStock" stepKey="deleteStock"/> - <magentoCLI command="config:set {{CatalogInventoryOptionsOnlyXleftThreshold.path}} {{CatalogInventoryOptionsOnlyXleftThreshold.value}}" stepKey="removedStockThresholdQty"/> - <magentoCLI stepKey="reindexAfterDeletingTheStock" command="indexer:reindex"/> - <magentoCLI stepKey="flushCacheAfterDeletingTheStock" command="cache:flush"/> - </after> - - <!-- Step2: Create the Subcategory --> - <createData entity="_defaultCategory" stepKey="createCategory"/> - <!-- Step3: Create the Source and the Stock --> - <createData entity="BasicMsiStockWithMainWebsite1" stepKey="createStock"/> - <createData entity="FullSource1" stepKey="createSource"/> - <createData entity="SourceStockLinked1" stepKey="stockSourceLink"> - <requiredEntity createDataKey="createSource"/> - <requiredEntity createDataKey="createStock"/> - </createData> - <!-- Create and Update the product as per the test case --> - <createData entity="ApiSimpleProduct" stepKey="createProduct"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForCreatedProduct"> - <argument name="product" value="$$createProduct$$"/> - </actionGroup> - <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> - <argument name="product" value="$$createProduct$$"/> - </actionGroup> - <fillField userInput="10" selector="{{AdminProductFormSection.productPrice}}" stepKey="updatePriceTo10"/> - <fillField userInput="1" selector="{{AdminProductFormSection.productWeight}}" stepKey="updateWeight"/> - <conditionalClick selector="{{AdminProductFormConfigurationsSection.unAssignSource('Default Source')}}" dependentSelector="{{AdminProductFormConfigurationsSection.unAssignSource('Default Source')}}" visible="true" stepKey="unAssignDefaultSource"/> - <click selector="{{AdminProductFormConfigurationsSection.btnAssignSources}}" stepKey="clickAssignSourcesButton"/> - <waitForElementVisible selector="{{AdminProductFormConfigurationsSection.searchBySource}}" stepKey="waitForSearchSourceToBeVisible"/> - <fillField userInput="$$createSource.source[source_code]$$" selector="{{AdminProductFormConfigurationsSection.searchBySource}}" stepKey="enterSource"/> - <click selector="{{AdminProductFormConfigurationsSection.clickSearch}}" stepKey="clickSearchButton"/> - <waitForElementVisible selector="{{AdminProductFormConfigurationsSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="waitForAssignSourcesToBeVisible"/> - <checkOption selector="{{AdminProductFormConfigurationsSection.chkSourceToAssign('$$createSource.source[source_code]$$')}}" stepKey="checkTheCreatedSource"/> - <click selector="{{AdminProductFormConfigurationsSection.btnDoneAssignedSources}}" stepKey="clickOnDoneButton"/> - <fillField userInput="2" selector="{{AdminProductFormSection.assignedSourcesQty}}" stepKey="setQtyForAssignedSources"/> - <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButton"/> - <see userInput="You saved the product." stepKey="saveSuccessfulForManageStockAsYes"/> - <magentoCLI stepKey="reindexPostAssigningTheSource" command="indexer:reindex"/> - <magentoCLI stepKey="flushCachePostAssigningTheSource" command="cache:flush"/> - <!-- Verify with Manage Stock set as Yes for the product --> - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> - <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> - </actionGroup> - <see selector=".availability.only" userInput="Only 2 left" stepKey="seeCurrentProductQuantity2"/> - <!-- Update the Manage Stock as No for the product --> - <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForCreatedProductForManageStockAsNo"> - <argument name="product" value="$$createProduct$$"/> - </actionGroup> - <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProductForManageStockAsNo"> - <argument name="product" value="$$createProduct$$"/> - </actionGroup> - <waitForElementVisible selector="{{AdminProductFormSection.btnAdvancedInventory}}" stepKey="waitForAdvancedInventoryToBeVisible"/> - <click selector="{{AdminProductFormSection.btnAdvancedInventory}}" stepKey="clickOnAdvancedInventoryButton"/> - <waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="waitForAdvancedInventoryPageToBeLoaded"/> - <uncheckOption selector="{{AdminProductFormAdvancedInventorySection.checkConfigSettingsAdvancedInventory('use_config_manage_stock')}}" stepKey="uncheckManageStockOption"/> - <selectOption userInput="No" selector="{{AdminProductFormAdvancedInventorySection.manageStock}}" stepKey="selectNoAsManageStock"/> - <click selector="{{AdminProductFormAdvancedInventorySection.doneButton}}" stepKey="clickOnAdvancedInventoryDoneButton"/> - <click selector="{{AdminProductFormSection.save}}" stepKey="clickOnSaveButtonPostSettingManageStockAsNo"/> - <see userInput="You saved the product." stepKey="saveSuccessfulForManageStockAsNo"/> - <magentoCLI stepKey="reindexForSettingManageStockAsNo" command="indexer:reindex"/> - <magentoCLI stepKey="flushCacheForSettingManageStockAsNo" command="cache:flush"/> - <!-- Verify with Manage Stock set as No for the product --> - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPageOnStorefrontForManageStockAsNo"> - <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> - </actionGroup> - <dontSee selector=".availability.only" userInput="Only 2 left" stepKey="ShouldNotSeeCurrentProductQuantity"/> - - </test> -</tests> From 686760c5a55c995bb344aabd005ca1bbb12a06d9 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 8 May 2023 16:39:11 -0700 Subject: [PATCH 175/277] BUG#AC-6666:resolved code review comments --- .../Magento/CatalogGraphQl/Model/AttributesJoiner.php | 9 +++++---- .../Model/Resolver/Product/ProductFieldsSelector.php | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 995c678e47c99..27eb49593c7e6 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -10,6 +10,7 @@ use GraphQL\Language\AST\FieldNode; use GraphQL\Language\AST\InlineFragmentNode; use GraphQL\Language\AST\NodeKind; +use GraphQL\Language\AST\NodeList; use Magento\Eav\Model\Entity\Collection\AbstractCollection; use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; @@ -81,13 +82,13 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): /** * Get an array of queried data. * - * @param array $query + * @param NodeList $query * @param ResolveInfo $resolveInfo * @return array */ - public function getQueryData($query, $resolveInfo): array + public function getQueryData(NodeList $query, ResolveInfo $resolveInfo): array { - $selectedFields = $fragmentFields = []; + $selectedFields = $fragmentFields = $data = []; foreach ($query as $field) { if ($field->kind === NodeKind::INLINE_FRAGMENT) { $fragmentFields[] = $this->addInlineFragmentFields($resolveInfo, $field); @@ -107,9 +108,9 @@ public function getQueryData($query, $resolveInfo): array $selectedFields[] = $field->name->value; } } - $data = []; $data['selectedFields'] = $selectedFields; $data['fragmentFields'] = $fragmentFields; + return $data; } diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php index d0092c87abad7..ab9fed035cc35 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductFieldsSelector.php @@ -55,7 +55,7 @@ public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeN $queryFields = $this->attributesJoiner->getQueryFields($node, $info); $fieldNames[] = $queryFields; } - $fieldNames = array_merge(...$fieldNames); - return $fieldNames; + + return array_merge(...$fieldNames); } } From 07dd24fc8af017de014b52800976b57943a413e6 Mon Sep 17 00:00:00 2001 From: Rachana <rachana@BLR1-LMC-N84150.local> Date: Mon, 8 May 2023 16:42:49 -0700 Subject: [PATCH 176/277] BUG#AC-6666:resolved code review comments --- .../Magento/CatalogGraphQl/Model/AttributesJoiner.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index 27eb49593c7e6..ed85a1dbdfe83 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -70,11 +70,11 @@ public function getQueryFields(FieldNode $fieldNode, ResolveInfo $resolveInfo): if (null === $this->getFieldNodeSelections($fieldNode)) { $query = $fieldNode->selectionSet->selections; /** @var FieldNode $field */ - $res = $this->getQueryData($query, $resolveInfo); - if ($res['fragmentFields']) { - $res['selectedFields'] = array_merge([], $res['selectedFields'], ...$res['fragmentFields']); + $result = $this->getQueryData($query, $resolveInfo); + if ($result['fragmentFields']) { + $result['selectedFields'] = array_merge([], $result['selectedFields'], ...$result['fragmentFields']); } - $this->setSelectionsForFieldNode($fieldNode, array_unique($res['selectedFields'])); + $this->setSelectionsForFieldNode($fieldNode, array_unique($result['selectedFields'])); } return $this->getFieldNodeSelections($fieldNode); } From d17d461a338162d56fa6cad646bbf68d95fe65eb Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 11 May 2023 21:21:19 +0530 Subject: [PATCH 177/277] ACQE-4879 | Integration Testing - Enable password change frequency limit (for Admin) --- .../Adminhtml/UserResetPasswordEmailTest.php | 90 ++++++++++++++++++- 1 file changed, 89 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 c1b19ca77beb4..51233d45ef0f1 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -7,21 +7,26 @@ namespace Magento\User\Controller\Adminhtml; +use Magento\Framework\App\Config\Storage\WriterInterface; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Mail\EmailMessage; +use Magento\Framework\Message\MessageInterface; use Magento\Store\Model\Store; 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\Fixture\DbIsolation; +use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Mail\Template\TransportBuilderMock; use Magento\TestFramework\TestCase\AbstractBackendController; use Magento\User\Model\User as UserModel; +use Magento\User\Model\UserFactory; use Magento\User\Test\Fixture\User as UserDataFixture; /** * Test class for user reset password email - * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @magentoAppArea adminhtml */ class UserResetPasswordEmailTest extends AbstractBackendController @@ -36,6 +41,16 @@ class UserResetPasswordEmailTest extends AbstractBackendController */ protected $userModel; + /** + * @var UserFactory + */ + private $userFactory; + + /** + * @var WriterInterface + */ + private $configWriter; + /** * @throws LocalizedException */ @@ -44,6 +59,8 @@ protected function setUp(): void parent::setUp(); $this->fixtures = DataFixtureStorageManager::getStorage(); $this->userModel = $this->_objectManager->create(UserModel::class); + $this->userFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(UserFactory::class); + $this->configWriter = $this->_objectManager->get(WriterInterface::class); } #[ @@ -74,4 +91,75 @@ private function getResetPasswordUri(EmailMessage $message): string $urlString = trim($match[0][0], $store->getBaseUrl('web')); return substr($urlString, 0, strpos($urlString, "/key")); } + + /** + * @return void + * @throws LocalizedException + */ + #[ + DbIsolation(false), + Config( + 'admin/security/min_time_between_password_reset_requests', + '0', + 'store' + ), + DataFixture(UserDataFixture::class, ['role_id' => 1], 'user') + ] + public function testEnablePasswordChangeFrequencyLimit(): void + { + // Load admin user + $user = $this->fixtures->get('user'); + $username = $user->getDataByKey('username'); + $adminEmail = $user->getDataByKey('email'); + + // login admin + $adminUser = $this->userFactory->create(); + $adminUser->login($username, \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD); + + // Resetting password multiple times + for ($i = 0; $i < 5; $i++) { + $this->getRequest()->setPostValue('email', $adminEmail); + $this->dispatch('backend/admin/auth/forgotpassword'); + } + + /** @var TransportBuilderMock $transportMock */ + $transportMock = Bootstrap::getObjectManager()->get( + TransportBuilderMock::class + ); + $sendMessage = $transportMock->getSentMessage()->getBody()->getParts()[0]->getRawContent(); + + $this->assertStringContainsString( + 'There was recently a request to change the password for your account', + $sendMessage + ); + + // Setting the limit to greater than 0 + $this->configWriter->save('admin/security/min_time_between_password_reset_requests', 2); + + // Resetting password multiple times + for ($i = 0; $i < 5; $i++) { + $this->getRequest()->setPostValue('email', $adminEmail); + $this->dispatch('backend/admin/auth/forgotpassword'); + } + + $this->assertSessionMessages( + $this->equalTo( + ['We received too many requests for password resets.' + . ' Please wait and try again later or contact hello@example.com.'] + ), + MessageInterface::TYPE_ERROR + ); + + // Wait for 2 minutes before resetting password + sleep(120); + + $this->getRequest()->setPostValue('email', $adminEmail); + $this->dispatch('backend/admin/auth/forgotpassword'); + + $sendMessage = $transportMock->getSentMessage()->getBody()->getParts()[0]->getRawContent(); + $this->assertStringContainsString( + 'There was recently a request to change the password for your account', + $sendMessage + ); + } } From a522c69e0a23ad4fc3487042128cd8e93d442e39 Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 11 May 2023 22:33:26 +0530 Subject: [PATCH 178/277] ACQE-4879 | Static test fix --- .../User/Controller/Adminhtml/UserResetPasswordEmailTest.php | 2 +- 1 file changed, 1 insertion(+), 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 51233d45ef0f1..38b1b2c30c738 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -145,7 +145,7 @@ public function testEnablePasswordChangeFrequencyLimit(): void $this->assertSessionMessages( $this->equalTo( ['We received too many requests for password resets.' - . ' Please wait and try again later or contact hello@example.com.'] + . ' Please wait and try again later or contact hello@example.com.'] ), MessageInterface::TYPE_ERROR ); From 9ea7b8e11676d0b005bcc4f0312acd8998028335 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 15 May 2023 16:40:57 +0530 Subject: [PATCH 179/277] implementing review comment --- .../Test/Mftf/Section/LocaleOptionsSection.xml | 1 - ...nChangeTimeZoneForDifferentWebsiteActionGroup.xml | 12 ++++++------ .../Test/OrderDataGridDisplaysPurchaseDateTest.xml | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml index 0d40a6a4005a1..268ff07850f43 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml @@ -21,6 +21,5 @@ <element name="changeStoreConfigButton" type="button" selector="//button[@id='store-change-button']"/> <element name="changeStoreConfigToSpecificWebsite" type="select" selector="//a[contains(text(),'{{var}}')]" parameterized="true"/> <element name="changeWebsiteConfirmButton" type="button" selector="//button[@class='action-primary action-accept']/span"/> - <element name="checkboxTimeZone" type="checkbox" selector="//input[@id='general_locale_timezone_inherit']"/> </section> </sections> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml index d5d66a4117f59..83f7749992e31 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml @@ -16,16 +16,16 @@ <argument name="timeZoneName" type="string"/> </arguments> <amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="navigateToLocaleConfigurationPage"/> - <waitForPageLoad stepKey="waitForPageLoadPostNavigateToLocaleConfigurationPage"/> + <waitForPageLoad stepKey="waitForConfigPageLoad"/> <click selector="{{LocaleOptionsSection.changeStoreConfigButton}}" stepKey="changeStoreButton"/> - <wait time="10" stepKey="waitForStoreOption"/> + <waitForPageLoad stepKey="waitForStoreOption"/> <click selector="{{LocaleOptionsSection.changeStoreConfigToSpecificWebsite(websiteName)}}" stepKey="selectNewWebsite"/> - <wait time="10" stepKey="waitForWebsiteChange"/> + <waitForPageLoad stepKey="waitForWebsiteChange"/> <!-- Accept the current popup visible on the page. --> <click selector="{{LocaleOptionsSection.changeWebsiteConfirmButton}}" stepKey="confirmModal"/> - <wait time="10" stepKey="waitForPageToApplyConfig"/> - <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.checkIfTabExpand}}" visible="true"/> - <click selector="{{LocaleOptionsSection.checkboxTimeZone}}" stepKey="unCheckCheckbox"/> + <waitForPageLoad stepKey="waitForSaveChange"/> + <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.CheckIfTabExpand}}" visible="true"/> + <click selector="{{LocaleOptionsSection.useDefault}}" stepKey="unCheckCheckbox"/> <waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/> <selectOption userInput="{{timeZoneName}}" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultOption"/> </actionGroup> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml index 07eb202567ed0..6d114e63f6995 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml @@ -5,7 +5,7 @@ * 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="OrderDataGridDisplaysPurchaseDateTest"> @@ -70,7 +70,7 @@ <argument name="Customer" value="$$createCustomer$$" /> </actionGroup> </before> - + ​ <after> <!-- Disabled Store URLs --> <magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="setAddStoreCodeToUrlsToNo"/> @@ -120,7 +120,7 @@ <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/> <!-- Click Place Order button --> <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> - <!-- capture date at time of Placeing Order --> + <!-- capture date at time of Placing Order --> <generateDate date="+2 hour" format="M j, Y" stepKey="generateDateAtFirstOrderTime"/> <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabFirstOrderNumber"/> <amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/> @@ -151,7 +151,7 @@ <!-- Click Place Order button --> <wait time="75" stepKey="waitBeforePlaceOrder"/> <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrderSecondTime"/> - <!-- capture date at time of Placeing Order --> + <!-- capture date at time of Placing Order --> <generateDate date="+2 hour" format="M j, Y" stepKey="generateDateAtSecondOrderTime"/> <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabSecondOrderNumber"/> <!-- Go to admin and check order status --> From cee76a98c6623690b2e8f89517ecd07fafa38daf Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Mon, 15 May 2023 17:29:06 +0530 Subject: [PATCH 180/277] [ACQE-4983] Uncommenting CLI command to switch to production mode --- .../Test/Mftf/Suite/MagentoDeveloperModeOnlyTestSuite.xml | 4 +--- .../Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml | 7 +------ .../Test/FlushStaticFilesCacheButtonVisibilityTest.xml | 3 ++- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoDeveloperModeOnlyTestSuite.xml b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoDeveloperModeOnlyTestSuite.xml index 3a7d3663c8875..8c3e0f750debd 100644 --- a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoDeveloperModeOnlyTestSuite.xml +++ b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoDeveloperModeOnlyTestSuite.xml @@ -14,9 +14,7 @@ <group name="developer_mode_only"/> </include> <after> - <!-- Command should be uncommented once MQE-1711 is resolved --> - <comment userInput="Command should be uncommented once MQE-1711 is resolved" stepKey="comment" /> - <!-- <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> --> + <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> </after> </suite> </suites> diff --git a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml index bf7014cdbb49d..2a90e38818028 100644 --- a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml +++ b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml @@ -8,15 +8,10 @@ <suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd"> <suite name="MagentoProductionModeOnlyTestSuite"> <before> - <!-- Command should be uncommented once MQE-1711 is resolved --> - <comment userInput="Command should be uncommented once MQE-1711 is resolved" stepKey="comment" /> - <!-- <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> --> + <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> </before> <include> <group name="production_mode_only"/> </include> - <after> - <comment userInput="Command should be uncommented once MQE-1711 is resolved" stepKey="comment" /> - </after> </suite> </suites> diff --git a/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml b/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml index a7cf367ff3030..4d1a174632661 100644 --- a/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml +++ b/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml @@ -31,6 +31,7 @@ <waitForPageLoad stepKey="waitForPageCacheManagementLoad"/> <!-- Check 'Flush Static Files Cache' not visible in production mode. --> - <dontSee selector="{{AdminCacheManagementSection.additionalCacheButton('Flush Static Files Cache')}}" stepKey="dontSeeFlushStaticFilesButton" /> + <scrollTo selector="{{AdminCacheManagementSection.additionalCacheButton('Flush Catalog Images Cache')}}" stepKey="scrollToAdditionalCacheButtons"/> + <dontSeeElement selector="{{AdminCacheManagementSection.additionalCacheButton('Flush Static Files Cache')}}" stepKey="dontSeeFlushStaticFilesButton"/> </test> </tests> From 499bc849650be71db13ff49038c40f9b2c8df111 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Tue, 16 May 2023 08:23:16 +0530 Subject: [PATCH 181/277] modifing file --- .../Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml | 2 +- .../Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml index 268ff07850f43..2c3ffef2cabf1 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml @@ -16,7 +16,7 @@ <element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/> <element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/> <element name="defaultLocale" type="checkbox" selector="#general_locale_code_inherit"/> - <element name="checkIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/> + <element name="CheckIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/> <element name="timeZoneDropdown" type="select" selector="//select[@id='general_locale_timezone']"/> <element name="changeStoreConfigButton" type="button" selector="//button[@id='store-change-button']"/> <element name="changeStoreConfigToSpecificWebsite" type="select" selector="//a[contains(text(),'{{var}}')]" parameterized="true"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml index 6d114e63f6995..1ac8b58b115b1 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/OrderDataGridDisplaysPurchaseDateTest.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="OrderDataGridDisplaysPurchaseDateTest"> @@ -70,7 +69,6 @@ <argument name="Customer" value="$$createCustomer$$" /> </actionGroup> </before> - ​ <after> <!-- Disabled Store URLs --> <magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="setAddStoreCodeToUrlsToNo"/> From 64384194bff5483bfc947f62b7d203e78e215495 Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Tue, 16 May 2023 12:08:58 +0530 Subject: [PATCH 182/277] [ACQE-4983] Adding after tag for the suite --- .../Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml index 2a90e38818028..03cbbb3e85844 100644 --- a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml +++ b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml @@ -13,5 +13,7 @@ <include> <group name="production_mode_only"/> </include> + <after> + </after> </suite> </suites> From b83b759c71078c102092289fad76665bbee24941 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Tue, 16 May 2023 13:13:19 +0530 Subject: [PATCH 183/277] resolve entity referance issue --- .../Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml | 2 +- .../AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml index 2c3ffef2cabf1..268ff07850f43 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml @@ -16,7 +16,7 @@ <element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/> <element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/> <element name="defaultLocale" type="checkbox" selector="#general_locale_code_inherit"/> - <element name="CheckIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/> + <element name="checkIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/> <element name="timeZoneDropdown" type="select" selector="//select[@id='general_locale_timezone']"/> <element name="changeStoreConfigButton" type="button" selector="//button[@id='store-change-button']"/> <element name="changeStoreConfigToSpecificWebsite" type="select" selector="//a[contains(text(),'{{var}}')]" parameterized="true"/> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml index 83f7749992e31..7b33c5229a869 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/AdminChangeTimeZoneForDifferentWebsiteActionGroup.xml @@ -24,7 +24,7 @@ <!-- Accept the current popup visible on the page. --> <click selector="{{LocaleOptionsSection.changeWebsiteConfirmButton}}" stepKey="confirmModal"/> <waitForPageLoad stepKey="waitForSaveChange"/> - <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.CheckIfTabExpand}}" visible="true"/> + <conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.checkIfTabExpand}}" visible="true"/> <click selector="{{LocaleOptionsSection.useDefault}}" stepKey="unCheckCheckbox"/> <waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/> <selectOption userInput="{{timeZoneName}}" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultOption"/> From 91ceacdb4816dd1de6c0c53e817fc9994765dd78 Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Tue, 16 May 2023 18:26:18 +0530 Subject: [PATCH 184/277] [ACQE-4983] Removing production mode deploy command as it is default setting --- .../Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml index 03cbbb3e85844..82ba4102736f7 100644 --- a/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml +++ b/app/code/Magento/Deploy/Test/Mftf/Suite/MagentoProductionModeOnlyTestSuite.xml @@ -7,13 +7,8 @@ --> <suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd"> <suite name="MagentoProductionModeOnlyTestSuite"> - <before> - <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> - </before> <include> <group name="production_mode_only"/> </include> - <after> - </after> </suite> </suites> From 921095a0d71b815b927e7ce4a396bd08d71b419a Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Wed, 17 May 2023 11:48:25 +0530 Subject: [PATCH 185/277] AC-4536: GiftWrapTaxShouldBeDisplayedOnlyWhenGiftWrapIsSelectedBackendTest test case dependencies in CE --- ...ShoppingCartDisplaySettingsActionGroup.xml | 53 +++++++++++++++++++ ...ShoppingCartDisplaySettingsActionGroup.xml | 47 ++++++++++++++++ .../Test/Mftf/Section/SalesConfigSection.xml | 5 ++ .../Mftf/Section/AdminOrdersGridSection.xml | 5 ++ 4 files changed, 110 insertions(+) create mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml create mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml new file mode 100644 index 0000000000000..4e31a85588c25 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml @@ -0,0 +1,53 @@ +<?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="ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup"> + <annotations> + <description>Goes to the 'Configuration' page for 'Tax'. Resets 'Tax Class for Shipping' to 'Taxable Goods'. Updates the Shopping cart display settongs. Clicks on the Save button.</description> + </annotations> + <arguments> + <argument name="taxClassForGiftOptions" type="string" defaultValue="None"/> + <argument name="shoppingCartDisplayPrices" type="string" defaultValue="Excluding Tax"/> + <argument name="shoppingCartDisplaySubtotal" type="string" defaultValue="Excluding Tax"/> + <argument name="shoppingCartDisplayShippingAmt" type="string" defaultValue="Excluding Tax"/> + <argument name="shoppingCartDisplayGiftWrappingPrices" type="string" defaultValue="Excluding Tax"/> + <argument name="shoppingCartDisplayPrintedCardPrices" type="string" defaultValue="Excluding Tax"/> + <argument name="shoppingCartDisplayFullTaxSummary" type="string" defaultValue="No"/> + </arguments> + <amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <conditionalClick selector="{{SalesConfigSection.TaxClassesTab}}" dependentSelector="{{SalesConfigSection.CheckIfTaxClassesTabExpand}}" visible="true" stepKey="expandTaxClassesTab"/> + <waitForElementVisible selector="{{SalesConfigSection.ShippingTaxClass}}" stepKey="seeShippingTaxClass"/> + <selectOption selector="{{SalesConfigSection.TaxClassForGiftOptions}}" userInput="{{taxClassForGiftOptions}}" stepKey="setShippingTaxClassForGiftOptions"/> + <click selector="{{SalesConfigSection.TaxClassesTab}}" stepKey="collapseTaxClassesTab"/> + <conditionalClick selector="{{SalesConfigSection.ShoppingCartDisplaySettingsTab}}" dependentSelector="{{SalesConfigSection.ShoppingCartDisplaySettingsTabExpand}}" visible="true" stepKey="expandShoppingCartDisplaySettingsTab"/> + <waitForElementVisible selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="seeDisplayPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="uncheckDisplayPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('subtotal')}}" stepKey="uncheckDisplaySubtotalCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('shipping')}}" stepKey="uncheckDisplayShippingAmountCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="uncheckDisplayGiftWrappingPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('printed_card')}}" stepKey="uncheckDisplayPrintedCardPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('full_summary')}}" stepKey="uncheckDisplayFullTaxSummaryCheckbox"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('price')}}" userInput="{{shoppingCartDisplayPrices}}" stepKey="setDisplayPrices"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('subtotal')}}" userInput="{{shoppingCartDisplaySubtotal}}" stepKey="setDisplaySubtotal"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('shipping')}}" userInput="{{shoppingCartDisplayShippingAmt}}" stepKey="setDisplayShipping"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('gift_wrapping')}}" userInput="{{shoppingCartDisplayGiftWrappingPrices}}" stepKey="setDisplayGiftWrapping"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('printed_card')}}" userInput="{{shoppingCartDisplayPrintedCardPrices}}" stepKey="setDisplayPrintedCard"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('full_summary')}}" userInput="{{shoppingCartDisplayFullTaxSummary}}" stepKey="setDisplayFullSummary"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="checkDisplayPricesCheckbox"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('subtotal')}}" stepKey="checkDisplaySubtotalCheckbox"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('shipping')}}" stepKey="checkDisplayShippingAmountCheckbox"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="checkDisplayGiftWrappingPricesCheckbox"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('printed_card')}}" stepKey="checkDisplayPrintedCardPricesCheckbox"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('full_summary')}}" stepKey="checkDisplayFullTaxSummaryCheckbox"/> + <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> + <see userInput="You saved the configuration." stepKey="seeSuccessMessagePostSavingTheConfig"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml new file mode 100644 index 0000000000000..886e903dbcf65 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml @@ -0,0 +1,47 @@ +<?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="SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup"> + <annotations> + <description>Goes to the 'Configuration' page for 'Tax'. Sets 'Tax Class for Shipping' to 'Taxable Goods'. Updates the Shopping cart display settongs. Clicks on the Save button.</description> + </annotations> + <arguments> + <argument name="taxClassForGiftOptions" type="string" defaultValue="Taxable Goods"/> + <argument name="shoppingCartDisplayPrices" type="string" defaultValue="Including and Excluding Tax"/> + <argument name="shoppingCartDisplaySubtotal" type="string" defaultValue="Including and Excluding Tax"/> + <argument name="shoppingCartDisplayShippingAmt" type="string" defaultValue="Including and Excluding Tax"/> + <argument name="shoppingCartDisplayGiftWrappingPrices" type="string" defaultValue="Including and Excluding Tax"/> + <argument name="shoppingCartDisplayPrintedCardPrices" type="string" defaultValue="Including and Excluding Tax"/> + <argument name="shoppingCartDisplayFullTaxSummary" type="string" defaultValue="Yes"/> + </arguments> + <amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <conditionalClick selector="{{SalesConfigSection.TaxClassesTab}}" dependentSelector="{{SalesConfigSection.CheckIfTaxClassesTabExpand}}" visible="true" stepKey="expandTaxClassesTab"/> + <waitForElementVisible selector="{{SalesConfigSection.ShippingTaxClass}}" stepKey="seeShippingTaxClass"/> + <selectOption selector="{{SalesConfigSection.TaxClassForGiftOptions}}" userInput="{{taxClassForGiftOptions}}" stepKey="setShippingTaxClassForGiftOptions"/> + <click selector="{{SalesConfigSection.TaxClassesTab}}" stepKey="collapseTaxClassesTab"/> + <conditionalClick selector="{{SalesConfigSection.ShoppingCartDisplaySettingsTab}}" dependentSelector="{{SalesConfigSection.ShoppingCartDisplaySettingsTabExpand}}" visible="true" stepKey="expandShoppingCartDisplaySettingsTab"/> + <waitForElementVisible selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="seeDisplayPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="uncheckDisplayPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('subtotal')}}" stepKey="uncheckDisplaySubtotalCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('shipping')}}" stepKey="uncheckDisplayShippingAmountCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="uncheckDisplayGiftWrappingPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('printed_card')}}" stepKey="uncheckDisplayPrintedCardPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('full_summary')}}" stepKey="uncheckDisplayFullTaxSummaryCheckbox"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('price')}}" userInput="{{shoppingCartDisplayPrices}}" stepKey="setDisplayPrices"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('subtotal')}}" userInput="{{shoppingCartDisplaySubtotal}}" stepKey="setDisplaySubtotal"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('shipping')}}" userInput="{{shoppingCartDisplayShippingAmt}}" stepKey="setDisplayShipping"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('gift_wrapping')}}" userInput="{{shoppingCartDisplayGiftWrappingPrices}}" stepKey="setDisplayGiftWrapping"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('printed_card')}}" userInput="{{shoppingCartDisplayPrintedCardPrices}}" stepKey="setDisplayPrintedCard"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('full_summary')}}" userInput="{{shoppingCartDisplayFullTaxSummary}}" stepKey="setDisplayFullSummary"/> + <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> + <see userInput="You saved the configuration." stepKey="seeSuccessMessagePostSavingTheConfig"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml b/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml index 878a0c24f7331..f971b4dd03cec 100644 --- a/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml @@ -13,5 +13,10 @@ <element name="CheckIfTaxClassesTabExpand" type="button" selector="#tax_classes-head:not(.open)"/> <element name="ShippingTaxClass" type="select" selector="#tax_classes_shipping_tax_class"/> <element name="EnableTaxClassForShipping" type="checkbox" selector="#tax_classes_shipping_tax_class_inherit"/> + <element name="TaxClassForGiftOptions" type="select" selector="#tax_classes_wrapping_tax_class"/> + <element name="ShoppingCartDisplaySettingsTab" type="button" selector="#tax_cart_display-head"/> + <element name="ShoppingCartDisplaySettingsTabExpand" type="button" selector="#tax_cart_display-head:not(.open)"/> + <element name="ParameterizedShoppingCartDisplayCheckbox" type="checkbox" selector="//input[@name='groups[cart_display][fields][{{arg}}][inherit]']" parameterized="true"/> + <element name="ParameterizedShoppingCartDisplayDropdown" type="select" selector="//input[@name='groups[cart_display][fields][{{arg}}][inherit]']/../..//select" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index e2172a903397f..4c8655d33ceff 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -47,5 +47,10 @@ <element name="exactOrderId" type="text" selector="//table[contains(@class, 'data-grid')]//div[text()='{{orderId}}']" parameterized="true"/> <element name="orderIdByIncrementId" type="text" selector="//input[@class='admin__control-checkbox' and @value={{incrId}}]/parent::label/parent::td/following-sibling::td" parameterized="true"/> <element name="orderSubtotal" type="input" selector="//tbody//tr[@class='col-0']//td[@class='label' and contains(text(),'Subtotal')]/..//td//span[@class='price']"/> + <element name="orderPageSearchPRoductBySKU" type="input" selector="#sales_order_create_search_grid_filter_sku"/> + <element name="searchProductButtonOrderPage" type="button" selector="//div[@class='order-details order-details-existing-customer']//button[@title='Search']" timeout="60"/> + <element name="selectGiftWrappingDesign" type="select" selector="#giftwrapping_design"/> + <element name="giftWrappingForOrderExclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> + <element name="giftWrappingForOrderInclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> </section> </sections> From 91e07312934a997bee2df7f929381c5cd072b8a7 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Wed, 17 May 2023 16:30:55 +0530 Subject: [PATCH 186/277] AC-4536: GiftWrapTaxShouldBeDisplayedOnlyWhenGiftWrapIsSelectedBackendTest --- ...ftOptionsAndShoppingCartDisplaySettingsActionGroup.xml | 8 ++++---- ...ftOptionsAndShoppingCartDisplaySettingsActionGroup.xml | 6 +++--- .../Sales/Test/Mftf/Section/AdminOrdersGridSection.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml index 4e31a85588c25..99bf20b3e671c 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ResetBackTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml @@ -17,7 +17,7 @@ <argument name="shoppingCartDisplayPrices" type="string" defaultValue="Excluding Tax"/> <argument name="shoppingCartDisplaySubtotal" type="string" defaultValue="Excluding Tax"/> <argument name="shoppingCartDisplayShippingAmt" type="string" defaultValue="Excluding Tax"/> - <argument name="shoppingCartDisplayGiftWrappingPrices" type="string" defaultValue="Excluding Tax"/> + <argument name="shoppingCartDisplayGiftsWrappingPrices" type="string" defaultValue="Excluding Tax"/> <argument name="shoppingCartDisplayPrintedCardPrices" type="string" defaultValue="Excluding Tax"/> <argument name="shoppingCartDisplayFullTaxSummary" type="string" defaultValue="No"/> </arguments> @@ -32,19 +32,19 @@ <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="uncheckDisplayPricesCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('subtotal')}}" stepKey="uncheckDisplaySubtotalCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('shipping')}}" stepKey="uncheckDisplayShippingAmountCheckbox"/> - <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="uncheckDisplayGiftWrappingPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="uncheckDisplayGiftsWrappingPricesCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('printed_card')}}" stepKey="uncheckDisplayPrintedCardPricesCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('full_summary')}}" stepKey="uncheckDisplayFullTaxSummaryCheckbox"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('price')}}" userInput="{{shoppingCartDisplayPrices}}" stepKey="setDisplayPrices"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('subtotal')}}" userInput="{{shoppingCartDisplaySubtotal}}" stepKey="setDisplaySubtotal"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('shipping')}}" userInput="{{shoppingCartDisplayShippingAmt}}" stepKey="setDisplayShipping"/> - <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('gift_wrapping')}}" userInput="{{shoppingCartDisplayGiftWrappingPrices}}" stepKey="setDisplayGiftWrapping"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('gift_wrapping')}}" userInput="{{shoppingCartDisplayGiftsWrappingPrices}}" stepKey="setDisplayGiftsWrapping"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('printed_card')}}" userInput="{{shoppingCartDisplayPrintedCardPrices}}" stepKey="setDisplayPrintedCard"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('full_summary')}}" userInput="{{shoppingCartDisplayFullTaxSummary}}" stepKey="setDisplayFullSummary"/> <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="checkDisplayPricesCheckbox"/> <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('subtotal')}}" stepKey="checkDisplaySubtotalCheckbox"/> <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('shipping')}}" stepKey="checkDisplayShippingAmountCheckbox"/> - <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="checkDisplayGiftWrappingPricesCheckbox"/> + <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="checkDisplayGiftsWrappingPricesCheckbox"/> <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('printed_card')}}" stepKey="checkDisplayPrintedCardPricesCheckbox"/> <checkOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('full_summary')}}" stepKey="checkDisplayFullTaxSummaryCheckbox"/> <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml index 886e903dbcf65..3a825ebfb511f 100644 --- a/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/SetTaxClassForGiftOptionsAndShoppingCartDisplaySettingsActionGroup.xml @@ -17,7 +17,7 @@ <argument name="shoppingCartDisplayPrices" type="string" defaultValue="Including and Excluding Tax"/> <argument name="shoppingCartDisplaySubtotal" type="string" defaultValue="Including and Excluding Tax"/> <argument name="shoppingCartDisplayShippingAmt" type="string" defaultValue="Including and Excluding Tax"/> - <argument name="shoppingCartDisplayGiftWrappingPrices" type="string" defaultValue="Including and Excluding Tax"/> + <argument name="shoppingCartDisplayGiftsWrappingPrices" type="string" defaultValue="Including and Excluding Tax"/> <argument name="shoppingCartDisplayPrintedCardPrices" type="string" defaultValue="Including and Excluding Tax"/> <argument name="shoppingCartDisplayFullTaxSummary" type="string" defaultValue="Yes"/> </arguments> @@ -32,13 +32,13 @@ <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('price')}}" stepKey="uncheckDisplayPricesCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('subtotal')}}" stepKey="uncheckDisplaySubtotalCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('shipping')}}" stepKey="uncheckDisplayShippingAmountCheckbox"/> - <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="uncheckDisplayGiftWrappingPricesCheckbox"/> + <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('gift_wrapping')}}" stepKey="uncheckDisplayGiftsWrappingPricesCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('printed_card')}}" stepKey="uncheckDisplayPrintedCardPricesCheckbox"/> <uncheckOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayCheckbox('full_summary')}}" stepKey="uncheckDisplayFullTaxSummaryCheckbox"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('price')}}" userInput="{{shoppingCartDisplayPrices}}" stepKey="setDisplayPrices"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('subtotal')}}" userInput="{{shoppingCartDisplaySubtotal}}" stepKey="setDisplaySubtotal"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('shipping')}}" userInput="{{shoppingCartDisplayShippingAmt}}" stepKey="setDisplayShipping"/> - <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('gift_wrapping')}}" userInput="{{shoppingCartDisplayGiftWrappingPrices}}" stepKey="setDisplayGiftWrapping"/> + <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('gift_wrapping')}}" userInput="{{shoppingCartDisplayGiftsWrappingPrices}}" stepKey="setDisplayGiftsWrapping"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('printed_card')}}" userInput="{{shoppingCartDisplayPrintedCardPrices}}" stepKey="setDisplayPrintedCard"/> <selectOption selector="{{SalesConfigSection.ParameterizedShoppingCartDisplayDropdown('full_summary')}}" userInput="{{shoppingCartDisplayFullTaxSummary}}" stepKey="setDisplayFullSummary"/> <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index 4c8655d33ceff..beda3dadff25d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -49,7 +49,7 @@ <element name="orderSubtotal" type="input" selector="//tbody//tr[@class='col-0']//td[@class='label' and contains(text(),'Subtotal')]/..//td//span[@class='price']"/> <element name="orderPageSearchPRoductBySKU" type="input" selector="#sales_order_create_search_grid_filter_sku"/> <element name="searchProductButtonOrderPage" type="button" selector="//div[@class='order-details order-details-existing-customer']//button[@title='Search']" timeout="60"/> - <element name="selectGiftWrappingDesign" type="select" selector="#giftwrapping_design"/> + <element name="selectGiftsWrappingDesign" type="select" selector="#giftwrapping_design"/> <element name="giftWrappingForOrderExclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> <element name="giftWrappingForOrderInclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> </section> From e2621eaf2fc36dbf832cf619471586e840cd3bce Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 17 May 2023 13:28:28 -0500 Subject: [PATCH 187/277] ACPT-1316: Fix Sales Webapi GraphQl tests on MTS --- .../Magento/Eav/Model/Validator/Attribute/Data.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php index 7b29b9dde6790..c2c39ac89ea64 100644 --- a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php +++ b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php @@ -8,6 +8,7 @@ use Magento\Eav\Model\Attribute; use Magento\Eav\Model\AttributeDataFactory; +use Magento\Eav\Model\Config; use Magento\Framework\DataObject; /** @@ -47,14 +48,22 @@ class Data extends \Magento\Framework\Validator\AbstractValidator */ private $ignoredAttributesByTypesList; + /** + * @var \Magento\Eav\Model\Config + */ + private $eavConfig; + /** * @param AttributeDataFactory $attrDataFactory * @param array $ignoredAttributesByTypesList */ public function __construct( AttributeDataFactory $attrDataFactory, + Config $eavConfig = null, array $ignoredAttributesByTypesList = [] ) { + $this->eavConfig = $eavConfig ?: \Magento\Framework\App\ObjectManager::getInstance() + ->get(Config::class); $this->_attrDataFactory = $attrDataFactory; $this->ignoredAttributesByTypesList = $ignoredAttributesByTypesList; } @@ -166,8 +175,9 @@ protected function _getAttributes($entity) } elseif ($entity instanceof \Magento\Framework\Model\AbstractModel && $entity->getResource() instanceof \Magento\Eav\Model\Entity\AbstractEntity ) { // $entity is EAV-model + $type = $entity->getEntityType()->getEntityTypeCode(); /** @var \Magento\Eav\Model\Entity\Type $entityType */ - $entityType = $entity->getEntityType(); + $entityType = $this->eavConfig->getEntityType($type); $attributes = $entityType->getAttributeCollection()->getItems(); $ignoredTypeAttributes = $this->ignoredAttributesByTypesList[$entityType->getEntityTypeCode()] ?? []; From 51b2bc6cbc868cb7e04a044fd3047909afd8ed84 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 17 May 2023 17:21:41 -0500 Subject: [PATCH 188/277] ACPT-1316: Fix Sales Webapi GraphQl tests on MTS --- app/code/Magento/Eav/Model/Validator/Attribute/Data.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php index c2c39ac89ea64..49a9df669a48b 100644 --- a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php +++ b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php @@ -55,6 +55,7 @@ class Data extends \Magento\Framework\Validator\AbstractValidator /** * @param AttributeDataFactory $attrDataFactory + * @param Config $eavConfig|null * @param array $ignoredAttributesByTypesList */ public function __construct( From 1a1dc6acf7808b227aeacd540f3181440a78c319 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 17 May 2023 18:18:04 -0500 Subject: [PATCH 189/277] ACPT-1316: Fix Sales Webapi GraphQl tests on MTS --- .../Model/Validator/Attribute/DataTest.php | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php b/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php index 88daf1a8a6f52..45dd2dbfd41b7 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php @@ -13,6 +13,7 @@ use Magento\Eav\Model\AttributeDataFactory; use Magento\Eav\Model\Entity\AbstractEntity; use Magento\Eav\Model\Validator\Attribute\Data; +use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; use Magento\Framework\Model\AbstractModel; use Magento\Framework\ObjectManagerInterface; @@ -35,6 +36,11 @@ class DataTest extends TestCase */ private $model; + /** + * @var \Magento\Eav\Model\Config|MockObject + */ + private $eavConfigMock; + /** * @inheritdoc */ @@ -49,7 +55,12 @@ protected function setUp(): void ] ) ->getMock(); - + $this->createMock(ObjectManagerInterface::class); + ObjectManager::setInstance($this->createMock(ObjectManagerInterface::class)); + $this->eavConfigMock = $this->getMockBuilder(\Magento\Eav\Model\Config::class) + ->onlyMethods(['getEntityType']) + ->disableOriginalConstructor() + ->getMock(); $this->model = new Data($this->attrDataFactory); } @@ -205,13 +216,16 @@ public function testIsValidAttributesFromCollection(): void 'is_visible' => true, ] ); + $entityTypeCode = 'entity_type_code'; $collection = $this->getMockBuilder(DataObject::class) ->addMethods(['getItems'])->getMock(); $collection->expects($this->once())->method('getItems')->willReturn([$attribute]); $entityType = $this->getMockBuilder(DataObject::class) - ->addMethods(['getAttributeCollection']) + ->addMethods(['getAttributeCollection','getEntityTypeCode']) ->getMock(); + $entityType->expects($this->atMost(2))->method('getEntityTypeCode')->willReturn($entityTypeCode); $entityType->expects($this->once())->method('getAttributeCollection')->willReturn($collection); + $this->eavConfigMock->expects($this->once())->method('getEntityType')->with($entityTypeCode)->willReturn($entityType); $entity = $this->_getEntityMock(); $entity->expects($this->once())->method('getResource')->willReturn($resource); $entity->expects($this->once())->method('getEntityType')->willReturn($entityType); @@ -235,7 +249,7 @@ public function testIsValidAttributesFromCollection(): void )->willReturn( $dataModel ); - $validator = new Data($attrDataFactory); + $validator = new Data($attrDataFactory, $this->eavConfigMock); $validator->setData(['attribute' => 'new_test_data']); $this->assertTrue($validator->isValid($entity)); From b95f266273e312bf32147401c24417eb3b26806d Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 17 May 2023 21:11:37 -0500 Subject: [PATCH 190/277] ACPT-1316: Fix Sales Webapi GraphQl tests on MTS --- app/code/Magento/Eav/Model/Validator/Attribute/Data.php | 2 +- .../Eav/Test/Unit/Model/Validator/Attribute/DataTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php index 49a9df669a48b..11adf5eac31fd 100644 --- a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php +++ b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php @@ -55,7 +55,7 @@ class Data extends \Magento\Framework\Validator\AbstractValidator /** * @param AttributeDataFactory $attrDataFactory - * @param Config $eavConfig|null + * @param Config|null $eavConfig * @param array $ignoredAttributesByTypesList */ public function __construct( diff --git a/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php b/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php index 45dd2dbfd41b7..e1aab7f44b48a 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php @@ -225,7 +225,8 @@ public function testIsValidAttributesFromCollection(): void ->getMock(); $entityType->expects($this->atMost(2))->method('getEntityTypeCode')->willReturn($entityTypeCode); $entityType->expects($this->once())->method('getAttributeCollection')->willReturn($collection); - $this->eavConfigMock->expects($this->once())->method('getEntityType')->with($entityTypeCode)->willReturn($entityType); + $this->eavConfigMock->expects($this->once())->method('getEntityType') + ->with($entityTypeCode)->willReturn($entityType); $entity = $this->_getEntityMock(); $entity->expects($this->once())->method('getResource')->willReturn($resource); $entity->expects($this->once())->method('getEntityType')->willReturn($entityType); From 28d6b8d8545c1e3d3274ea3f36047ad57f7a9327 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Thu, 18 May 2023 11:30:44 +0530 Subject: [PATCH 191/277] ACQE-4426: GiftWrapTaxShouldBeDisplayedOnlyWhenGiftWrapIsSelectedBackendTest removed remaining GiftWrapping words --- .../Sales/Test/Mftf/Section/AdminOrdersGridSection.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index beda3dadff25d..5b64cd5264b82 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -47,10 +47,10 @@ <element name="exactOrderId" type="text" selector="//table[contains(@class, 'data-grid')]//div[text()='{{orderId}}']" parameterized="true"/> <element name="orderIdByIncrementId" type="text" selector="//input[@class='admin__control-checkbox' and @value={{incrId}}]/parent::label/parent::td/following-sibling::td" parameterized="true"/> <element name="orderSubtotal" type="input" selector="//tbody//tr[@class='col-0']//td[@class='label' and contains(text(),'Subtotal')]/..//td//span[@class='price']"/> - <element name="orderPageSearchPRoductBySKU" type="input" selector="#sales_order_create_search_grid_filter_sku"/> + <element name="orderPageSearchProductBySKU" type="input" selector="#sales_order_create_search_grid_filter_sku"/> <element name="searchProductButtonOrderPage" type="button" selector="//div[@class='order-details order-details-existing-customer']//button[@title='Search']" timeout="60"/> <element name="selectGiftsWrappingDesign" type="select" selector="#giftwrapping_design"/> - <element name="giftWrappingForOrderExclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> - <element name="giftWrappingForOrderInclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> + <element name="giftsWrappingForOrderExclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> + <element name="giftsWrappingForOrderInclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> </section> </sections> From 094d85695772f0f3e5ec125e342f27c2a7df3f44 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Thu, 18 May 2023 13:15:44 +0530 Subject: [PATCH 192/277] ACQE-4426: GiftWrapTaxShouldBeDisplayedOnlyWhenGiftWrapIsSelectedBackendTest removed remaining GiftWrapping element xpath as well --- .../Sales/Test/Mftf/Section/AdminOrdersGridSection.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index 5b64cd5264b82..dfb9eb99372ac 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -50,7 +50,7 @@ <element name="orderPageSearchProductBySKU" type="input" selector="#sales_order_create_search_grid_filter_sku"/> <element name="searchProductButtonOrderPage" type="button" selector="//div[@class='order-details order-details-existing-customer']//button[@title='Search']" timeout="60"/> <element name="selectGiftsWrappingDesign" type="select" selector="#giftwrapping_design"/> - <element name="giftsWrappingForOrderExclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> - <element name="giftsWrappingForOrderInclTaxPrice" type="text" selector="//tr[@class='giftwrapping']//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> + <element name="giftsWrappingForOrderExclTaxPrice" type="text" selector="//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> + <element name="giftsWrappingForOrderInclTaxPrice" type="text" selector="//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> </section> </sections> From 090ae7994bbdf42076424c2924dff9547450d196 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 18 May 2023 17:22:32 +0530 Subject: [PATCH 193/277] added EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest file and related files --- ...inPayPalPayflowProWithValutActionGroup.xml | 35 +++++++ .../Paypal/Test/Mftf/Data/PaypalData.xml | 6 ++ ...ProCreditCardForRegisteredCustomerTest.xml | 94 +++++++++++++++++++ .../Section/AdminOrderFormPaymentSection.xml | 1 + .../Mftf/Section/AdminOrdersGridSection.xml | 1 + 5 files changed, 137 insertions(+) create mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml new file mode 100644 index 0000000000000..2e7c301d97da4 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.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="AdminPayPalPayflowProWithValutActionGroup"> + <annotations> + <description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description> + </annotations> + <arguments> + <argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/> + <argument name="countryCode" type="string" defaultValue="us"/> + </arguments> + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> + <waitForPageLoad stepKey="waitForConfigPageLoad"/> + <click selector ="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="expandOtherPaypalConfigButton"/> + <scrollTo selector="{{PayPalPayflowProConfigSection.paymentGateway(countryCode)}}" stepKey="scrollToConfigure"/> + <click selector ="{{PayPalPayflowProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/> + <scrollTo selector="{{PayPalPayflowProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/> + <fillField selector ="{{PayPalPayflowProConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentspro_parner}}" stepKey="inputPartner"/> + <fillField selector ="{{PayPalPayflowProConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentspro_user}}" stepKey="inputUser"/> + <fillField selector ="{{PayPalPayflowProConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentspro_vendor}}" stepKey="inputVendor"/> + <fillField selector ="{{PayPalPayflowProConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentspro_password}}" stepKey="inputPassword"/> + <selectOption selector="{{PayPalPayflowProConfigSection.testmode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/> + <selectOption selector ="{{PayPalPayflowProConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/> + <selectOption selector ="{{PayPalPayflowProConfigSection.enableVault(countryCode)}}" userInput="Yes" stepKey="enableSolutionValut"/> + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> + <waitForPageLoad stepKey="waitForSaving"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml index 95e69cf6e93cf..fa557a12a3bee 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml @@ -223,4 +223,10 @@ <data key="paypal_express_api_signature">AFcWxV21C7fd0v3bYYYRCpSSRl31AqoP3QLd.JUUpDPuPpQIgT0-m401</data> <data key="paypal_express_merchantID">54Z2EE6T7PRB4</data> </entity> + <entity name="SamplePaypalPaymentsProConfig" type="paypal_paymentspro_config"> + <data key="paypal_paymentspro_parner">PayPal</data> + <data key="paypal_paymentspro_user">MksGLTest</data> + <data key="paypal_paymentspro_vendor">MksGLTest</data> + <data key="paypal_paymentspro_password">Abcd@123</data> + </entity> </entities> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml new file mode 100644 index 0000000000000..28cacd936323e --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml @@ -0,0 +1,94 @@ +<?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="EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest"> + <annotations> + <features value="PayPal"/> + <stories value="Payment methods"/> + <title value="Edit Order from Admin with saved within PayPal Payflow Pro credit card for Registered Customer"/> + <description value="Edit Order from Admin with saved within PayPal Payflow Pro credit card for Registered Customer"/> + <severity value="MAJOR"/> + <testCaseId value="AC-5107"/> + <group value="paypal"/> + <group value="payfloepro"/> + </annotations> + <before> + <!--Create a customer--> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <!-- Create simple product--> + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"/> + <!-- Login to admin--> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!-- Configure Paypal payflowpro--> + <actionGroup ref="AdminPayPalPayflowProWithValutActionGroup" stepKey="ConfigPayPalExpress"> + <argument name="credentials" value="SamplePaypalPaymentsProConfig"/> + </actionGroup> + </before> + <after> + <!-- Disable payflowpro--> + <createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/> + <!-- Delete product and customer--> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!-- Logout--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!-- Login as Customer --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> + <!-- Add product 1 to cart --> + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> + <argument name="productName" value="$createSimpleProduct1.name$"/> + </actionGroup> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> + <!-- Select shipping --> + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> + <argument name="shippingMethodName" value="Flat Rate"/> + </actionGroup> + <!-- Go to Order review --> + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> + <!-- Checkout select Credit Card (Payflow Pro) and place order--> + <waitForPageLoad stepKey="waitForLoadingMask"/> + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> + <!--Fill Card Data and place an order--> + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> + <argument name="cardData" value="VisaDefaultCard"/> + </actionGroup> + <waitForPageLoad stepKey="waitForFillCardData"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> + <!-- Grab order number--> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> + <!--Navigate to admin order grid and filter the order--> + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderById"> + <argument name="orderId" value="$grabOrderNumber"/> + </actionGroup> + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> + <!-- Click on edit--> + <actionGroup ref="AdminEditOrderActionGroup" stepKey="openOrderForEdit"> + <argument name="orderId" value="$grabOrderNumber"/> + </actionGroup> + <!-- Select stored card and submit order--> + <conditionalClick selector="{{AdminOrderFormPaymentSection.storedCard}}" dependentSelector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" visible="true" stepKey="checkCheckMoneyOption"/> + <click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/> + <see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/> + <!-- Filter order--> + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderByIdAgain"> + <argument name="orderId" value="$grabOrderNumber"/> + </actionGroup> + <!--verify order status is canceled--> + <click selector="{{AdminOrdersGridSection.secondRow}}" stepKey="clickSecondOrderRow"/> + <waitForPageLoad stepKey="waitForOrderPageLoad"/> + <see userInput="Canceled" selector="{{AdminOrderDetailsInformationSection.orderStatus}}" stepKey="seeOrderStatus"/> + </test> +</tests> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml index 447e6fcad7b49..499f067a3e1c8 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml @@ -31,5 +31,6 @@ <element name="freePaymentLabel" type="text" selector="#order-billing_method_form label[for='p_method_free']"/> <element name="paymentLabelWithRadioButton" type="text" selector="#order-billing_method_form .admin__field-option input[title='{{paymentMethodName}}'] + label" parameterized="true"/> <element name="checkoutPaymentMethod" type="radio" selector="//div[@class='payment-method _active']/div/input[@id= '{{methodName}}']" parameterized="true"/> + <element name="storedCard" type="radio" selector="#p_method_payflowpro_cc_vault" timeout="30"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index e2172a903397f..48ca3930890ae 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -47,5 +47,6 @@ <element name="exactOrderId" type="text" selector="//table[contains(@class, 'data-grid')]//div[text()='{{orderId}}']" parameterized="true"/> <element name="orderIdByIncrementId" type="text" selector="//input[@class='admin__control-checkbox' and @value={{incrId}}]/parent::label/parent::td/following-sibling::td" parameterized="true"/> <element name="orderSubtotal" type="input" selector="//tbody//tr[@class='col-0']//td[@class='label' and contains(text(),'Subtotal')]/..//td//span[@class='price']"/> + <element name="secondRow" type="button" selector="tr.data-row:nth-of-type(2)"/> </section> </sections> From bb208c3e574ecd5a99d5de81749e6b3df529cabc Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 18 May 2023 19:24:38 +0530 Subject: [PATCH 194/277] added PayPalPayflowProConfigSection file and related files --- .../PayPalPayflowProConfigSection.xml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml new file mode 100644 index 0000000000000..9f4b2a6a47f19 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/PayPalPayflowProConfigSection.xml @@ -0,0 +1,21 @@ +<?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="PayPalPayflowProConfigSection"> + <element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout-head" parameterized="true"/> + <element name="partner" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_partner" parameterized="true"/> + <element name="user" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_user" parameterized="true"/> + <element name="vendor" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_vendor" parameterized="true"/> + <element name="password" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_pwd" parameterized="true"/> + <element name="testmode" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_sandbox_flag" parameterized="true"/> + <element name="enableSolution" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/> + <element name="enableVault" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_payflowpro_cc_vault_active" parameterized="true"/> + <element name="paymentGateway" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways-head" parameterized="true"/> + </section> +</sections> From b1197fe0051b297d20d7afa67a7d85fb79b6aa24 Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Fri, 19 May 2023 00:14:26 +0530 Subject: [PATCH 195/277] [ACQE-4974] MFTF test to verify category page is not cached --- ...refrontVerifyCategoryPageNotCachedTest.xml | 146 ++++++++++++++++++ .../Tax/Test/Mftf/Data/TaxRateData.xml | 3 + 2 files changed, 149 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml new file mode 100644 index 0000000000000..a67c40074ad93 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.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="StorefrontVerifyCategoryPageNotCachedTest"> + <annotations> + <features value="Catalog"/> + <stories value="Product Categories Indexer"/> + <title value="Verify category page is not cached"/> + <description value="Verify that the category page is NOT cached for customers with different tax rates"/> + <group value="Catalog"/> + <group value="indexer"/> + </annotations> + <before> + <!--Login to Admin Panel--> + <actionGroup ref="AdminLoginActionGroup" stepKey="logInAsAdmin"/> + <!-- Create tax rate for CA --> + <createData entity="US_CA_Rate_1" stepKey="CATaxRate"/> + <!-- Create tax rate for TX --> + <createData entity="ThirdTaxRateTexas" stepKey="createTaxRateTX"/> + <!-- Create Tax Rules --> + <actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createTaxRule1"> + <argument name="taxRate" value="$$CATaxRate$$"/> + <argument name="taxRule" value="SimpleTaxRule"/> + </actionGroup> + <actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createTaxRule2"> + <argument name="taxRate" value="$$createTaxRateTX$$"/> + <argument name="taxRule" value="SimpleTaxRule2"/> + </actionGroup> + <!--Create Customers--> + <createData entity="Simple_US_CA_Customer" stepKey="createCustomerCA"/> + <createData entity="Simple_US_Customer" stepKey="createCustomerTX"/> + <!--Create Category--> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <!--Create Products--> + <createData entity="SimpleProduct" stepKey="simpleProduct"> + <field key="price">100</field> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="simpleProduct2"> + <field key="price">200</field> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!--Display product price including and excluding tax in catalog--> + <magentoCLI command="config:set tax/display/type 3" stepKey="enableShowIncludingExcludingTax"/> + </before> + <after> + <magentoCLI command="config:set tax/display/type 0" stepKey="disableShowIncludingExcludingTax"/> + <!--Delete Products--> + <deleteData createDataKey="simpleProduct" stepKey="deleteProductOne"/> + <deleteData createDataKey="simpleProduct2" stepKey="deleteProductTwo"/> + <!--Delete Category--> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <!--Delete Tax Rules--> + <actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule1"> + <argument name="taxRuleCode" value="{{SimpleTaxRule.code}}"/> + </actionGroup> + <actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule2"> + <argument name="taxRuleCode" value="{{SimpleTaxRule2.code}}"/> + </actionGroup> + <!--Delete Tax Rates--> + <deleteData createDataKey="CATaxRate" stepKey="deleteTaxRate1"/> + <deleteData createDataKey="createTaxRateTX" stepKey="deleteTaxRate2"/> + <!--Delete Customers--> + <deleteData createDataKey="createCustomerCA" stepKey="deleteCustomer1"/> + <deleteData createDataKey="createCustomerTX" stepKey="deleteCustomer2"/> + <!--Logout Admin--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> + </after> + + <!-- Login as customer 1--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> + <argument name="Customer" value="$$createCustomerCA$$"/> + </actionGroup> + <!-- Assert Customer Name --> + <actionGroup ref="AssertCustomerWelcomeMessageActionGroup" stepKey="assertCustomerLoggedIn"> + <argument name="customerFullName" value="$$createCustomerCA.firstname$$ $$createCustomerCA.lastname$$" /> + </actionGroup> + <!-- Navigate to category page --> + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage"> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <!-- Assert Product Prices --> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seePriceCategoryPageProduct1"> + <argument name="productName" value="$$simpleProduct.name$$"/> + <argument name="productPrice" value="$108.25"/> + </actionGroup> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeInclPriceCategoryPageProduct2"> + <argument name="productName" value="$$simpleProduct2.name$$"/> + <argument name="productPrice" value="$216.50"/> + </actionGroup> + <!--Add first product to compare list and cart --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openFirstProductPage"> + <argument name="productUrl" value="$$simpleProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="addFirstProductToCompare"> + <argument name="productVar" value="$$simpleProduct$$"/> + </actionGroup> + <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> + <!--Add second product to compare list --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openSecondProductPage"> + <argument name="productUrl" value="$$simpleProduct2.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="addSecondProductToCompare"> + <argument name="productVar" value="$$simpleProduct2$$"/> + </actionGroup> + <!--Add second product to wishlist --> + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="wishlist"> + <argument name="productVar" value="$$simpleProduct2$$"/> + </actionGroup> + <!-- Customer 1 logout --> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> + <!-- Customer 2 login --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomer2Login"> + <argument name="Customer" value="$$createCustomerTX$$"/> + </actionGroup> + <!-- Assert Wishlist is empty --> + <actionGroup ref="NavigateThroughCustomerTabsActionGroup" stepKey="navigateToWishlist"> + <argument name="navigationItemName" value="My Wish List"/> + </actionGroup> + <actionGroup ref="StorefrontAssertCustomerWishlistIsEmptyActionGroup" stepKey="assertNoItemsInWishlist"/> + <!-- Assert minicart is empty --> + <actionGroup ref="AssertMiniCartEmptyActionGroup" stepKey="assertMiniCartEmpty"/> + <!-- Navigate to category page --> + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage4"> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <!-- Assert Compare list is empty --> + <seeElement selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" stepKey="assertCompareListIsEmpty"/> + <!-- Assert Product Prices --> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seePrice2CategoryPageProduct1"> + <argument name="productName" value="$$simpleProduct.name$$"/> + <argument name="productPrice" value="$120"/> + </actionGroup> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeInclPrice2CategoryPageProduct2"> + <argument name="productName" value="$$simpleProduct2.name$$"/> + <argument name="productPrice" value="$240"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml b/app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml index bc6099790431f..4bc1c068570f4 100644 --- a/app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml +++ b/app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml @@ -147,4 +147,7 @@ <entity name="SecondTaxRateTexas" extends="TaxRateTexas"> <data key="rate">0.125</data> </entity> + <entity name="ThirdTaxRateTexas" extends="TaxRateTexas"> + <data key="rate">20</data> + </entity> </entities> From 8bc06e00b204ab82f3a15f23cdfee8e930d637fe Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Thu, 18 May 2023 19:49:08 -0500 Subject: [PATCH 196/277] ACPT-1324: Fix CustomerCustomAttributes GraphQl tests on MTS --- lib/internal/Magento/Framework/App/Http/Context.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/App/Http/Context.php b/lib/internal/Magento/Framework/App/Http/Context.php index aedc50bccc475..6c4648be087ff 100644 --- a/lib/internal/Magento/Framework/App/Http/Context.php +++ b/lib/internal/Magento/Framework/App/Http/Context.php @@ -142,5 +142,6 @@ public function toArray() public function _resetState(): void { $this->data = []; + $this->default = []; } } From 19fa77cbcdcd2a2c0b0029008091ecc98b752c46 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Fri, 19 May 2023 10:00:56 +0530 Subject: [PATCH 197/277] ACQE-4426: GiftWrapTaxShouldBeDisplayedOnlyWhenGiftWrapIsSelectedBackendTest removed remaining GiftWrapping element xpath as well --- .../Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index dfb9eb99372ac..7f2c6c7f80705 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -49,7 +49,7 @@ <element name="orderSubtotal" type="input" selector="//tbody//tr[@class='col-0']//td[@class='label' and contains(text(),'Subtotal')]/..//td//span[@class='price']"/> <element name="orderPageSearchProductBySKU" type="input" selector="#sales_order_create_search_grid_filter_sku"/> <element name="searchProductButtonOrderPage" type="button" selector="//div[@class='order-details order-details-existing-customer']//button[@title='Search']" timeout="60"/> - <element name="selectGiftsWrappingDesign" type="select" selector="#giftwrapping_design"/> + <element name="selectGiftsWrappingDesign" type="select" selector="//label[@class='admin__field-label' and text()='Gift Wrapping Design']/..//select"/> <element name="giftsWrappingForOrderExclTaxPrice" type="text" selector="//td[contains(text(),'Gift Wrapping for Order (Excl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> <element name="giftsWrappingForOrderInclTaxPrice" type="text" selector="//td[contains(text(),'Gift Wrapping for Order (Incl. Tax)')]/..//span[@class='price' and text()='${{price}}']" parameterized="true"/> </section> From cb4aab3e11279568f9b036eca36b1e344b7a30a9 Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Fri, 19 May 2023 10:37:06 +0530 Subject: [PATCH 198/277] [ACQE-4974] Adding severity to the test case --- .../Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml index a67c40074ad93..0803fdc079388 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml @@ -11,9 +11,10 @@ <test name="StorefrontVerifyCategoryPageNotCachedTest"> <annotations> <features value="Catalog"/> - <stories value="Product Categories Indexer"/> <title value="Verify category page is not cached"/> + <stories value="Product Categories Indexer"/> <description value="Verify that the category page is NOT cached for customers with different tax rates"/> + <severity value="AVERAGE"/> <group value="Catalog"/> <group value="indexer"/> </annotations> From 35586e3e34caeab821ebb7a4f2a2ba1cde7db7cd Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Fri, 19 May 2023 13:22:20 +0530 Subject: [PATCH 199/277] [ACQE-4974] Modifying stepkeys for better readability --- ...refrontVerifyCategoryPageNotCachedTest.xml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml index 0803fdc079388..6c79b40b3ff94 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCategoryPageNotCachedTest.xml @@ -22,12 +22,12 @@ <!--Login to Admin Panel--> <actionGroup ref="AdminLoginActionGroup" stepKey="logInAsAdmin"/> <!-- Create tax rate for CA --> - <createData entity="US_CA_Rate_1" stepKey="CATaxRate"/> + <createData entity="US_CA_Rate_1" stepKey="createTaxRateCA"/> <!-- Create tax rate for TX --> <createData entity="ThirdTaxRateTexas" stepKey="createTaxRateTX"/> <!-- Create Tax Rules --> <actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createTaxRule1"> - <argument name="taxRate" value="$$CATaxRate$$"/> + <argument name="taxRate" value="$$createTaxRateCA$$"/> <argument name="taxRule" value="SimpleTaxRule"/> </actionGroup> <actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createTaxRule2"> @@ -66,21 +66,21 @@ <argument name="taxRuleCode" value="{{SimpleTaxRule2.code}}"/> </actionGroup> <!--Delete Tax Rates--> - <deleteData createDataKey="CATaxRate" stepKey="deleteTaxRate1"/> + <deleteData createDataKey="createTaxRateCA" stepKey="deleteTaxRate1"/> <deleteData createDataKey="createTaxRateTX" stepKey="deleteTaxRate2"/> <!--Delete Customers--> <deleteData createDataKey="createCustomerCA" stepKey="deleteCustomer1"/> <deleteData createDataKey="createCustomerTX" stepKey="deleteCustomer2"/> <!--Logout Admin--> - <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> </after> <!-- Login as customer 1--> - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomer1Login"> <argument name="Customer" value="$$createCustomerCA$$"/> </actionGroup> <!-- Assert Customer Name --> - <actionGroup ref="AssertCustomerWelcomeMessageActionGroup" stepKey="assertCustomerLoggedIn"> + <actionGroup ref="AssertCustomerWelcomeMessageActionGroup" stepKey="assertCustomerName"> <argument name="customerFullName" value="$$createCustomerCA.firstname$$ $$createCustomerCA.lastname$$" /> </actionGroup> <!-- Navigate to category page --> @@ -88,11 +88,11 @@ <argument name="category" value="$$createCategory$$"/> </actionGroup> <!-- Assert Product Prices --> - <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seePriceCategoryPageProduct1"> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeProduct1TaxInclusivePriceCustomer1"> <argument name="productName" value="$$simpleProduct.name$$"/> <argument name="productPrice" value="$108.25"/> </actionGroup> - <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeInclPriceCategoryPageProduct2"> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeProduct2TaxInclusivePriceCustomer1"> <argument name="productName" value="$$simpleProduct2.name$$"/> <argument name="productPrice" value="$216.50"/> </actionGroup> @@ -103,7 +103,7 @@ <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="addFirstProductToCompare"> <argument name="productVar" value="$$simpleProduct$$"/> </actionGroup> - <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> + <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addFirstProductToCart"/> <!--Add second product to compare list --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openSecondProductPage"> <argument name="productUrl" value="$$simpleProduct2.custom_attributes[url_key]$$"/> @@ -112,11 +112,11 @@ <argument name="productVar" value="$$simpleProduct2$$"/> </actionGroup> <!--Add second product to wishlist --> - <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="wishlist"> + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addSecondProductToWishlist"> <argument name="productVar" value="$$simpleProduct2$$"/> </actionGroup> <!-- Customer 1 logout --> - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customer1Logout"/> <!-- Customer 2 login --> <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomer2Login"> <argument name="Customer" value="$$createCustomerTX$$"/> @@ -127,19 +127,19 @@ </actionGroup> <actionGroup ref="StorefrontAssertCustomerWishlistIsEmptyActionGroup" stepKey="assertNoItemsInWishlist"/> <!-- Assert minicart is empty --> - <actionGroup ref="AssertMiniCartEmptyActionGroup" stepKey="assertMiniCartEmpty"/> + <actionGroup ref="AssertMiniCartEmptyActionGroup" stepKey="assertMiniCartIsEmpty"/> <!-- Navigate to category page --> - <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage4"> + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage2"> <argument name="category" value="$$createCategory$$"/> </actionGroup> <!-- Assert Compare list is empty --> <seeElement selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" stepKey="assertCompareListIsEmpty"/> <!-- Assert Product Prices --> - <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seePrice2CategoryPageProduct1"> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeProduct1TaxInclusivePriceCustomer2"> <argument name="productName" value="$$simpleProduct.name$$"/> <argument name="productPrice" value="$120"/> </actionGroup> - <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeInclPrice2CategoryPageProduct2"> + <actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeProduct2TaxInclusivePriceCustomer2"> <argument name="productName" value="$$simpleProduct2.name$$"/> <argument name="productPrice" value="$240"/> </actionGroup> From 166f638e77a601e0e79650a7819c07a1724f892d Mon Sep 17 00:00:00 2001 From: Aparna Sreekumar <glo80326@adobe.com> Date: Sat, 20 May 2023 16:24:02 +0530 Subject: [PATCH 200/277] BUG#AC-8227: Tax Class set to None when creating new configurable variations in multi store mode --- .../Model/Product/VariationHandler.php | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php b/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php index 64c86976c05bb..50421c6967b36 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php @@ -7,16 +7,16 @@ namespace Magento\ConfigurableProduct\Model\Product; -use Magento\Catalog\Model\Product\Attribute\Source\Status; use Magento\Catalog\Model\Product\Type as ProductType; use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @api * @since 100.0.2 */ -class VariationHandler +class VariationHandler implements ResetAfterRequestInterface { /** * @var \Magento\Catalog\Model\Product\Gallery\Processor @@ -52,7 +52,7 @@ class VariationHandler /** * @var \Magento\CatalogInventory\Api\StockConfigurationInterface * @deprecated 100.1.0 - * @see MAGETWO-71174 + * @see MSI */ protected $stockConfiguration; @@ -121,7 +121,7 @@ public function generateSimpleProducts($parentProduct, $productsData) * Prepare attribute set comprising all selected configurable attributes * * @deprecated 100.1.0 - * @see MAGETWO-71174 + * @see prepareAttributeSet() * @param \Magento\Catalog\Model\Product $product * @return void */ @@ -205,6 +205,7 @@ protected function fillSimpleProductData( $parentProduct->getData($attribute->getAttributeCode()) ?? $attribute->getDefaultValue() ); } + $keysFilter = ['item_id', 'product_id', 'stock_id', 'type_id', 'website_id']; $postData['stock_data'] = array_diff_key((array)$parentProduct->getStockData(), array_flip($keysFilter)); $stockStatus = $parentProduct->getQuantityAndStockStatus(); @@ -213,7 +214,9 @@ protected function fillSimpleProductData( } $postData = $this->processMediaGallery($product, $postData); - $postData['status'] = $postData['status'] ?? Status::STATUS_ENABLED; + $postData['status'] = isset($postData['status']) + ? $postData['status'] + : \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED; $product->addData( $postData )->setWebsiteIds( @@ -300,4 +303,12 @@ function ($image) { } return $productData; } + + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->attributes = []; + } } From 978ca7049e001e678688d78b15829f9b1d2f61e0 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 19 May 2023 12:18:40 -0500 Subject: [PATCH 201/277] ACPT-1323: Fix Cms failures on app server --- .../Magento/GraphQl/CatalogCms/CategoryBlockTest.php | 1 + .../testsuite/Magento/GraphQl/Cms/CmsBlockTest.php | 2 ++ .../GraphQl/CmsGraphQl/Model/Resolver/BlockTest.php | 8 ++++++++ .../Magento/Framework/Model/AbstractExtensibleModel.php | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogCms/CategoryBlockTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogCms/CategoryBlockTest.php index 8e9a76a3a0cfd..091c0e419ee51 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogCms/CategoryBlockTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogCms/CategoryBlockTest.php @@ -19,6 +19,7 @@ class CategoryBlockTest extends GraphQlAbstract { /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Catalog/_files/category_tree.php * @magentoApiDataFixture Magento/Cms/_files/block.php */ diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php index 07de3e1641b60..fa9a2f21c8530 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php @@ -38,6 +38,7 @@ protected function setUp(): void /** * Verify the fields of CMS Block selected by identifiers * + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Cms/_files/blocks.php */ public function testGetCmsBlock() @@ -71,6 +72,7 @@ public function testGetCmsBlock() /** * Verify the fields of CMS Block selected by block_id * + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Cms/_files/blocks.php */ public function testGetCmsBlockByBlockId() diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CmsGraphQl/Model/Resolver/BlockTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CmsGraphQl/Model/Resolver/BlockTest.php index 65d2e2b784689..3756eddd1cd31 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CmsGraphQl/Model/Resolver/BlockTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CmsGraphQl/Model/Resolver/BlockTest.php @@ -18,6 +18,9 @@ use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException; use Magento\Widget\Model\Template\FilterEmulate; +/** + * Test for cms block resolver cache + */ class BlockTest extends ResolverCacheAbstract { /** @@ -52,6 +55,7 @@ protected function setUp(): void } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoDataFixture Magento/Cms/_files/blocks.php */ public function testCmsSingleBlockResolverCacheAndInvalidationAsGuest() @@ -90,6 +94,7 @@ public function testCmsSingleBlockResolverCacheAndInvalidationAsGuest() } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoDataFixture Magento/Cms/_files/block.php * @magentoDataFixture Magento/Cms/_files/blocks.php */ @@ -134,6 +139,7 @@ public function testCmsMultipleBlockResolverCacheAndInvalidationAsGuest() } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoDataFixture Magento/Cms/_files/block.php */ public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDeleted() @@ -171,6 +177,7 @@ public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDeleted() } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoDataFixture Magento/Cms/_files/blocks.php */ public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDisabled() @@ -209,6 +216,7 @@ public function testCmsBlockResolverCacheInvalidatesWhenBlockGetsDisabled() } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoDataFixture Magento/Cms/_files/block.php * @magentoDataFixture Magento/Store/_files/second_store.php */ diff --git a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php index 5fcfaa6fb635c..c5ea050fc60c7 100644 --- a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php @@ -127,7 +127,7 @@ protected function filterCustomAttributes($data) if (isset($data[self::CUSTOM_ATTRIBUTES][0])) { $data[self::CUSTOM_ATTRIBUTES] = $this->flattenCustomAttributesArrayToMap($data[self::CUSTOM_ATTRIBUTES]); } - $customAttributesCodes = $this->getCustomAttributesCodes(); + $customAttributesCodes = $this->getCustomAttributesCodes(); $data[self::CUSTOM_ATTRIBUTES] = array_intersect_key( (array) $data[self::CUSTOM_ATTRIBUTES], array_flip($customAttributesCodes) From 60f3391a02c6c64271c43b0ed7bba9c2e113d304 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 22 May 2023 13:59:06 -0500 Subject: [PATCH 202/277] ACPT-1253: Fix Store failures on app server --- .../testsuite/Magento/GraphQl/Store/AvailableStoresTest.php | 4 ++++ .../Magento/GraphQl/Store/StoreConfigResolverTest.php | 1 + 2 files changed, 5 insertions(+) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php index e17cafa9a43df..b722762cf8a06 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php @@ -47,6 +47,7 @@ protected function setUp(): void } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Store/_files/store.php * @magentoApiDataFixture Magento/Store/_files/inactive_store.php */ @@ -109,6 +110,7 @@ public function testDefaultWebsiteAvailableStoreConfigs(): void } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Store/_files/second_website_with_two_stores.php */ public function testNonDefaultWebsiteAvailableStoreConfigs(): void @@ -206,6 +208,7 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Store/_files/second_website_with_four_stores_divided_in_groups.php * @magentoConfigFixture web/url/use_store 1 */ @@ -266,6 +269,7 @@ public function testAllStoreConfigsWithCodeInUrlEnabled(): void } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Store/_files/second_website_with_four_stores_divided_in_groups.php */ public function testCurrentGroupStoreConfigs(): void diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigResolverTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigResolverTest.php index c79bbf0e0a300..80f55d83a40e2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigResolverTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigResolverTest.php @@ -35,6 +35,7 @@ protected function setUp(): void } /** + * @magentoConfigFixture default_store web/seo/use_rewrites 1 * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException */ From 33eed9508406dfb1d214ef95d8cc1f8ba2961f62 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Fri, 19 May 2023 16:43:18 -0500 Subject: [PATCH 203/277] ACPT-1327 Fixing translations not working when subsequent request has different translation locale --- lib/internal/Magento/Framework/Translate.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/Translate.php b/lib/internal/Magento/Framework/Translate.php index 3b8069c8ef2f1..7dc7622c2eed2 100644 --- a/lib/internal/Magento/Framework/Translate.php +++ b/lib/internal/Magento/Framework/Translate.php @@ -609,5 +609,6 @@ public function _resetState(): void { $this->_config = []; $this->_data = []; + $this->_localeCode = null; } } From 00eebca5408107edc3c78d00efcf38703520bf80 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Fri, 19 May 2023 15:22:45 -0500 Subject: [PATCH 204/277] Fixing reset for Magento/Catalog/Model/Product/Media/Config --- app/code/Magento/Catalog/Model/Product/Media/Config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Media/Config.php b/app/code/Magento/Catalog/Model/Product/Media/Config.php index 25c05dad46817..99c2513f5187a 100644 --- a/app/code/Magento/Catalog/Model/Product/Media/Config.php +++ b/app/code/Magento/Catalog/Model/Product/Media/Config.php @@ -30,7 +30,7 @@ class Config implements ConfigInterface, ResetAfterRequestInterface private $attributeHelper; /** - * @var string[] + * @var string[]|null */ private $mediaAttributeCodes; @@ -206,6 +206,6 @@ private function getAttributeHelper() */ public function _resetState(): void { - $this->mediaAttributeCodes = []; + $this->mediaAttributeCodes = null; } } From e6dadc88c6762e29870e83233f37622fbb47ff51 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Mon, 15 May 2023 09:25:49 -0500 Subject: [PATCH 205/277] ACPT-1194-part2 removing database isolation in StoreConfigTest.php because it causes PoisonPill to not function --- .../testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php index 884e2e87a9c57..47b317a6ec18e 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php @@ -12,7 +12,6 @@ /** * Test coverage for zero subtotal and check/money order payment methods in the store config * - * @magentoDbIsolation enabled */ class StoreConfigTest extends GraphQlAbstract { From 70d2e822960cbf06384b22c057f2d95cdcb41e27 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Thu, 11 May 2023 16:13:00 -0500 Subject: [PATCH 206/277] ACPT-1194-part2 Switch to CollectionFactory for categories in Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField. --- .../Product/FieldProvider/DynamicField.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php b/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php index 1db0bad36e243..227acf5dd7356 100644 --- a/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php +++ b/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php @@ -18,6 +18,7 @@ use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProviderInterface; use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Catalog\Model\ResourceModel\Category\Collection; +use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory; use Magento\Framework\App\ObjectManager; use Magento\Store\Model\StoreManagerInterface; @@ -29,9 +30,9 @@ class DynamicField implements FieldProviderInterface /** * Category collection. * - * @var Collection + * @var CollectionFactory */ - private $categoryCollection; + private $categoryCollectionFactory; /** * Customer group repository. @@ -79,8 +80,9 @@ class DynamicField implements FieldProviderInterface * @param SearchCriteriaBuilder $searchCriteriaBuilder * @param FieldNameResolver $fieldNameResolver * @param AttributeProvider $attributeAdapterProvider - * @param Collection $categoryCollection + * @param Collection $categoryCollection @deprecated @see $categoryCollectionFactory * @param StoreManagerInterface|null $storeManager + * * @param CollectionFactory|null $categoryCollectionFactory */ public function __construct( FieldTypeConverterInterface $fieldTypeConverter, @@ -90,7 +92,8 @@ public function __construct( FieldNameResolver $fieldNameResolver, AttributeProvider $attributeAdapterProvider, Collection $categoryCollection, - ?StoreManagerInterface $storeManager = null + ?StoreManagerInterface $storeManager = null, + ?CollectionFactory $categoryCollectionFactory = null ) { $this->groupRepository = $groupRepository; $this->searchCriteriaBuilder = $searchCriteriaBuilder; @@ -98,7 +101,7 @@ public function __construct( $this->indexTypeConverter = $indexTypeConverter; $this->fieldNameResolver = $fieldNameResolver; $this->attributeAdapterProvider = $attributeAdapterProvider; - $this->categoryCollection = $categoryCollection; + $this->categoryCollectionFactory = $categoryCollectionFactory ?: ObjectManager::getInstance()->get(CollectionFactory::class); $this->storeManager = $storeManager ?: ObjectManager::getInstance()->get(StoreManagerInterface::class); } @@ -108,7 +111,7 @@ public function __construct( public function getFields(array $context = []): array { $allAttributes = []; - $categoryIds = $this->categoryCollection->getAllIds(); + $categoryIds = $this->categoryCollectionFactory->create()->getAllIds(); $positionAttribute = $this->attributeAdapterProvider->getByAttributeCode('position'); $categoryNameAttribute = $this->attributeAdapterProvider->getByAttributeCode('category_name'); foreach ($categoryIds as $categoryId) { From 6be0c2b00659128e32e3d168ce4913869e2703e3 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Tue, 23 May 2023 16:00:59 -0500 Subject: [PATCH 207/277] ACPT-1263: Fix Catalog failures --- app/code/Magento/Catalog/Model/Layer/Resolver.php | 12 +++++++++++- .../PriceAttributeOptionsLabelTranslateTest.php | 2 +- lib/internal/Magento/Framework/App/Area.php | 11 +---------- lib/internal/Magento/Framework/App/AreaList.php | 12 +++++++++++- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Layer/Resolver.php b/app/code/Magento/Catalog/Model/Layer/Resolver.php index a4224aeafe7e0..af02538bcd436 100644 --- a/app/code/Magento/Catalog/Model/Layer/Resolver.php +++ b/app/code/Magento/Catalog/Model/Layer/Resolver.php @@ -9,12 +9,14 @@ namespace Magento\Catalog\Model\Layer; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; + /** * Layer Resolver * * @api */ -class Resolver +class Resolver implements ResetAfterRequestInterface { const CATALOG_LAYER_CATEGORY = 'category'; const CATALOG_LAYER_SEARCH = 'search'; @@ -79,4 +81,12 @@ public function get() } return $this->layer; } + + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->layer = null; + } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php index 425643a37f308..52df934512756 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php @@ -201,6 +201,6 @@ public function testValidateAggregateAttributeOptionsInLabelLocaleTranslationFor } } - $this->assertEquals($priceAttributeOptionLabel, 'Preisansicht'); + $this->assertEquals( 'Preisansicht', $priceAttributeOptionLabel); } } diff --git a/lib/internal/Magento/Framework/App/Area.php b/lib/internal/Magento/Framework/App/Area.php index dcda864197f88..58a690a230b59 100644 --- a/lib/internal/Magento/Framework/App/Area.php +++ b/lib/internal/Magento/Framework/App/Area.php @@ -9,7 +9,6 @@ namespace Magento\Framework\App; use Magento\Framework\ObjectManager\ConfigLoaderInterface; -use Magento\Framework\ObjectManager\ResetAfterRequestInterface; /** * Application area model @@ -17,7 +16,7 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @api */ -class Area implements \Magento\Framework\App\AreaInterface, ResetAfterRequestInterface +class Area implements \Magento\Framework\App\AreaInterface { public const AREA_GLOBAL = 'global'; public const AREA_FRONTEND = 'frontend'; @@ -261,12 +260,4 @@ protected function _initDesign() $this->_getDesign()->setArea($this->_code)->setDefaultDesignTheme(); return $this; } - - /** - * @inheritDoc - */ - public function _resetState(): void - { - $this->_loadedParts = []; - } } diff --git a/lib/internal/Magento/Framework/App/AreaList.php b/lib/internal/Magento/Framework/App/AreaList.php index 8c3cc1d551916..c69bf42bdc06a 100644 --- a/lib/internal/Magento/Framework/App/AreaList.php +++ b/lib/internal/Magento/Framework/App/AreaList.php @@ -5,12 +5,14 @@ */ namespace Magento\Framework\App; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; + /** * Lists router area codes & processes resolves FrontEndNames to area codes * * @api */ -class AreaList +class AreaList implements ResetAfterRequestInterface { /** * @var array @@ -127,4 +129,12 @@ public function getArea($code) } return $this->_areaInstances[$code]; } + + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->_areaInstances = []; + } } From 1faf86de6f526bfc1de865303a6087f494481d6c Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Tue, 23 May 2023 22:50:54 -0500 Subject: [PATCH 208/277] ACPT-1263: Fix Catalog failures --- lib/internal/Magento/Framework/Translate.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/Translate.php b/lib/internal/Magento/Framework/Translate.php index 3b8069c8ef2f1..7dc7622c2eed2 100644 --- a/lib/internal/Magento/Framework/Translate.php +++ b/lib/internal/Magento/Framework/Translate.php @@ -609,5 +609,6 @@ public function _resetState(): void { $this->_config = []; $this->_data = []; + $this->_localeCode = null; } } From b6996b0e09d0b9d966959579b672d73f527249f3 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Tue, 23 May 2023 22:52:42 -0500 Subject: [PATCH 209/277] ACPT-1263: Fix Catalog failures --- app/code/Magento/Catalog/Model/Layer/Resolver.php | 4 ++-- .../PriceAttributeOptionsLabelTranslateTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Layer/Resolver.php b/app/code/Magento/Catalog/Model/Layer/Resolver.php index af02538bcd436..b6ca16f1ac029 100644 --- a/app/code/Magento/Catalog/Model/Layer/Resolver.php +++ b/app/code/Magento/Catalog/Model/Layer/Resolver.php @@ -18,8 +18,8 @@ */ class Resolver implements ResetAfterRequestInterface { - const CATALOG_LAYER_CATEGORY = 'category'; - const CATALOG_LAYER_SEARCH = 'search'; + public const CATALOG_LAYER_CATEGORY = 'category'; + public const CATALOG_LAYER_SEARCH = 'search'; /** * Catalog view layer models list diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php index 52df934512756..643d2131bb995 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/PriceAttributeOptionsLabelTranslateTest.php @@ -201,6 +201,6 @@ public function testValidateAggregateAttributeOptionsInLabelLocaleTranslationFor } } - $this->assertEquals( 'Preisansicht', $priceAttributeOptionLabel); + $this->assertEquals('Preisansicht', $priceAttributeOptionLabel); } } From def84114503dd5f4933bb0a5e6d8a9b4aab14481 Mon Sep 17 00:00:00 2001 From: Andrii Kasian <akasian@adobe.com> Date: Wed, 24 May 2023 00:43:06 -0500 Subject: [PATCH 210/277] Store Url fixes --- app/code/Magento/Store/Model/Store.php | 17 ++++++++++++++++- .../Magento/Framework/App/Request/Http.php | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php index 34cbd76d24dc2..6e5f13e971395 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -17,6 +17,7 @@ use Magento\Framework\DataObject\IdentityInterface; use Magento\Framework\Filesystem; use Magento\Framework\Model\AbstractExtensibleModel; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; use Magento\Framework\Url\ModifierInterface; use Magento\Framework\Url\ScopeInterface as UrlScopeInterface; use Magento\Framework\UrlInterface; @@ -43,7 +44,8 @@ class Store extends AbstractExtensibleModel implements AppScopeInterface, UrlScopeInterface, IdentityInterface, - StoreInterface + StoreInterface, + ResetAfterRequestInterface { /** * Store Id key name @@ -1421,4 +1423,17 @@ public function __debugInfo() { return []; } + + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->_baseUrlCache = []; + $this->_configCache = null; + $this->_configCacheBaseNodes = []; + $this->_dirCache = []; + $this->_urlCache = []; + $this->_baseUrlCache = []; + } } diff --git a/lib/internal/Magento/Framework/App/Request/Http.php b/lib/internal/Magento/Framework/App/Request/Http.php index 4ecc40f0e3ceb..2535b499f8a6f 100644 --- a/lib/internal/Magento/Framework/App/Request/Http.php +++ b/lib/internal/Magento/Framework/App/Request/Http.php @@ -458,5 +458,6 @@ public function _resetState(): void $this->headers = null; $this->metadata = []; $this->content = ''; + $this->distroBaseUrl = null; } } From e8082cc777503c7e80a1d7f03443037b654d8bbe Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Wed, 24 May 2023 15:21:37 +0530 Subject: [PATCH 211/277] Added Assert Message --- .../ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml index f03365bd697f4..47db443124ad0 100644 --- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml @@ -31,5 +31,6 @@ <selectOption selector ="{{PayPalPayflowProConfigSection.enableVault(countryCode)}}" userInput="Yes" stepKey="enableSolutionValut"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> <waitForPageLoad stepKey="waitForSaving"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigurationSuccessMessage"/> </actionGroup> </actionGroups> From cb42aba02cf8869bda7882026e94a9a54dd4c1fa Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Wed, 24 May 2023 16:32:37 +0530 Subject: [PATCH 212/277] updated files --- .../ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml | 3 ++- ...thinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml index 2e7c301d97da4..c97e580a2c93a 100644 --- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml @@ -13,7 +13,7 @@ <description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description> </annotations> <arguments> - <argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/> + <argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/> <argument name="countryCode" type="string" defaultValue="us"/> </arguments> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> @@ -31,5 +31,6 @@ <selectOption selector ="{{PayPalPayflowProConfigSection.enableVault(countryCode)}}" userInput="Yes" stepKey="enableSolutionValut"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> <waitForPageLoad stepKey="waitForSaving"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml index 28cacd936323e..f16c1df71a129 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest.xml @@ -16,7 +16,7 @@ <severity value="MAJOR"/> <testCaseId value="AC-5107"/> <group value="paypal"/> - <group value="payfloepro"/> + <group value="payflowpro"/> </annotations> <before> <!--Create a customer--> @@ -39,7 +39,6 @@ <!-- Logout--> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> - <!-- Login as Customer --> <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> <argument name="Customer" value="$$createCustomer$$"/> From 06ecb2a971ceffbd0a1d98adedd48220b9c4c8d7 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 24 May 2023 11:26:15 -0500 Subject: [PATCH 213/277] ACPT-1327-without-ACPT-1327 fixing static test failures --- .../FieldMapper/Product/FieldProvider/DynamicField.php | 8 ++++---- .../Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php b/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php index 227acf5dd7356..87712641c05d4 100644 --- a/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php +++ b/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php @@ -42,8 +42,6 @@ class DynamicField implements FieldProviderInterface private $groupRepository; /** - * Search criteria builder. - * * @var SearchCriteriaBuilder */ private $searchCriteriaBuilder; @@ -82,7 +80,8 @@ class DynamicField implements FieldProviderInterface * @param AttributeProvider $attributeAdapterProvider * @param Collection $categoryCollection @deprecated @see $categoryCollectionFactory * @param StoreManagerInterface|null $storeManager - * * @param CollectionFactory|null $categoryCollectionFactory + * @param CollectionFactory|null $categoryCollectionFactory + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( FieldTypeConverterInterface $fieldTypeConverter, @@ -101,7 +100,8 @@ public function __construct( $this->indexTypeConverter = $indexTypeConverter; $this->fieldNameResolver = $fieldNameResolver; $this->attributeAdapterProvider = $attributeAdapterProvider; - $this->categoryCollectionFactory = $categoryCollectionFactory ?: ObjectManager::getInstance()->get(CollectionFactory::class); + $this->categoryCollectionFactory = $categoryCollectionFactory + ?: ObjectManager::getInstance()->get(CollectionFactory::class); $this->storeManager = $storeManager ?: ObjectManager::getInstance()->get(StoreManagerInterface::class); } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php index 47b317a6ec18e..f47efa6d2ecb8 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php @@ -15,7 +15,7 @@ */ class StoreConfigTest extends GraphQlAbstract { - const STORE_CONFIG_QUERY = <<<QUERY + public const STORE_CONFIG_QUERY = <<<QUERY { storeConfig { zero_subtotal_enabled From 31491028dc2e6c8036626a5ad8ad2c567e7be0be Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 24 May 2023 12:00:25 -0500 Subject: [PATCH 214/277] ACPT-1327 Updating unit test DynamicFieldTest --- .../Product/FieldProvider/DynamicFieldTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicFieldTest.php b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicFieldTest.php index 2cf8c9f6a3fa9..6b0e3961a8fc3 100644 --- a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicFieldTest.php +++ b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicFieldTest.php @@ -8,6 +8,7 @@ namespace Magento\Elasticsearch\Test\Unit\Model\Adapter\FieldMapper\Product\FieldProvider; use Magento\Catalog\Model\ResourceModel\Category\Collection; +use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory; use Magento\Customer\Api\Data\GroupInterface; use Magento\Customer\Api\Data\GroupSearchResultsInterface; use Magento\Customer\Api\GroupRepositoryInterface; @@ -111,8 +112,13 @@ protected function setUp(): void ->disableOriginalConstructor() ->onlyMethods(['getAllIds']) ->getMock(); + $categoryCollection = $this->getMockBuilder(CollectionFactory::class) + ->disableOriginalConstructor() + ->onlyMethods(['create']) + ->getMock(); + $categoryCollection->method('create') + ->willReturn($this->categoryCollection); $this->storeManager = $this->createMock(StoreManagerInterface::class); - $this->provider = new DynamicField( $this->fieldTypeConverter, $this->indexTypeConverter, @@ -121,7 +127,8 @@ protected function setUp(): void $this->fieldNameResolver, $this->attributeAdapterProvider, $this->categoryCollection, - $this->storeManager + $this->storeManager, + $categoryCollection ); } From 87cd334de2f417ca4ca82b5385d2e5f5365112f9 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Thu, 25 May 2023 16:10:43 +0530 Subject: [PATCH 215/277] AC-8834::2.4.7-Beta1-Composer Integration Test Failures-PHP 8.2-phpunit deprecated assertclasshasattribute function is removed --- .../Framework/App/ResourceConnection/ConnectionFactoryTest.php | 3 ++- .../Magento/Framework/ObjectManager/ObjectManagerTest.php | 3 ++- .../integration/testsuite/Magento/Framework/ProfilerTest.php | 3 ++- .../testsuite/Magento/ImportExport/Model/ExportTest.php | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ResourceConnection/ConnectionFactoryTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ResourceConnection/ConnectionFactoryTest.php index 93ed3d84c8452..72ba459997c32 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ResourceConnection/ConnectionFactoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ResourceConnection/ConnectionFactoryTest.php @@ -36,7 +36,8 @@ public function testCreate() ]; $connection = $this->model->create($dbConfig); $this->assertInstanceOf(\Magento\Framework\DB\Adapter\AdapterInterface::class, $connection); - $this->assertClassHasAttribute('logger', get_class($connection)); + $this->assertIsObject($connection); + $this->assertTrue(property_exists($connection, 'logger')); $object = new ReflectionClass(get_class($connection)); $attribute = $object->getProperty('logger'); $attribute->setAccessible(true); diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php index 9b5ea2f361ba9..5947368e197e6 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php @@ -141,7 +141,8 @@ public function testNewInstance($actualClassName, array $properties = [], $expec $object = new ReflectionClass($actualClassName); if ($properties) { foreach ($properties as $propertyName => $propertyClass) { - $this->assertClassHasAttribute($propertyName, $actualClassName); + $this->assertIsObject($testObject); + $this->assertTrue(property_exists($testObject, $propertyName)); $attribute = $object->getProperty($propertyName); $attribute->setAccessible(true); $propertyObject = $attribute->getValue($testObject); diff --git a/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php b/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php index 4a6c542a110bf..ef23ecbf9b2f6 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php @@ -25,7 +25,8 @@ public function testApplyConfigWithDrivers(array $config, array $expectedDrivers { $profiler = new \Magento\Framework\Profiler(); $profiler::applyConfig($config, ''); - $this->assertClassHasAttribute('_drivers', \Magento\Framework\Profiler::class); + $this->assertIsObject($profiler); + $this->assertTrue(property_exists($profiler, '_drivers')); $object = new ReflectionClass(\Magento\Framework\Profiler::class); $attribute = $object->getProperty('_drivers'); $attribute->setAccessible(true); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php index 50972ef0325a6..73aa382baafb3 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php @@ -35,7 +35,8 @@ public function testGetEntityAdapterWithValidEntity($entity, $expectedEntityType { $this->_model->setData(['entity' => $entity]); $this->_model->getEntityAttributeCollection(); - $this->assertClassHasAttribute('_entityAdapter', get_class($this->_model)); + $this->assertIsObject($this->_model); + $this->assertTrue(property_exists($this->_model, '_entityAdapter')); $object = new ReflectionClass(get_class($this->_model)); $attribute = $object->getProperty('_entityAdapter'); $attribute->setAccessible(true); From 16d2c9e39b30d22b04da4e6b1e220664bff02ff3 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Thu, 25 May 2023 17:24:10 +0530 Subject: [PATCH 216/277] AC-8834::2.4.7-Beta1-Composer Integration Test Failures-PHP 8.2-phpunit deprecated expectingerror function is removed --- .../Catalog/Model/Product/Attribute/Backend/StockTest.php | 2 +- .../Magento/Catalog/Model/Product/AuthorizationTest.php | 2 +- .../Magento/Catalog/Model/ProductWebsiteLinkRepositoryTest.php | 2 +- .../System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php | 2 +- .../ConfigurableProduct/Model/Product/Type/ConfigurableTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php index 24d5b668ac09c..e5cc7082b65da 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php @@ -54,7 +54,7 @@ protected function setUp(): void public function testValidate(): void { $this->expectException(LocalizedException::class); - $this->expectErrorMessage((string)__('Please enter a valid number in this field.')); + $this->expectExceptionMessage((string)__('Please enter a valid number in this field.')); $product = $this->productFactory->create(); $product->setQuantityAndStockStatus(['qty' => 'string']); $this->model->validate($product); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/AuthorizationTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/AuthorizationTest.php index 9d388dfac3a9e..5d1fff9f62feb 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/AuthorizationTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/AuthorizationTest.php @@ -136,7 +136,7 @@ public function postRequestData(): array public function testAuthorizedSavingOfWithException(array $data): void { $this->expectException(AuthorizationException::class); - $this->expectErrorMessage('Not allowed to edit the product\'s design attributes'); + $this->expectExceptionMessage('Not allowed to edit the product\'s design attributes'); $this->request->setPost(new Parameters($data)); /** @var Product $product */ diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductWebsiteLinkRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductWebsiteLinkRepositoryTest.php index 9ae327036971b..f94b9c6db54a3 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductWebsiteLinkRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductWebsiteLinkRepositoryTest.php @@ -65,7 +65,7 @@ public function testSaveWithoutWebsiteId(): void $productWebsiteLink = $this->productWebsiteLinkFactory->create(); $productWebsiteLink->setSku('unique-simple-azaza'); $this->expectException(InputException::class); - $this->expectErrorMessage((string)__('There are not websites for assign to product')); + $this->expectExceptionMessage((string)__('There are not websites for assign to product')); $this->productWebsiteLinkRepository->save($productWebsiteLink); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php index 9979e8cd6ea68..8bb5b83b5bd1c 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php @@ -83,7 +83,7 @@ protected function setUp(): void public function testSaveWithError(): void { $this->expectException(LocalizedException::class); - $this->expectErrorMessage((string)__('Anchor symbol (#) is not supported in url rewrite suffix.')); + $this->expectExceptionMessage((string)__('Anchor symbol (#) is not supported in url rewrite suffix.')); $this->model->setValue('.html#'); $this->model->beforeSave(); } diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php index 4b6fac496df0d..438ba1ed75e87 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php @@ -656,7 +656,7 @@ protected function getUsedProducts() */ public function testAddCustomOptionToConfigurableChildProduct(): void { - $this->expectErrorMessage( + $this->expectExceptionMessage( 'Required custom options cannot be added to a simple product that is a part of a composite product.' ); From fb90b048fa2f2c89cbe12463c8aa940bef95fac4 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Thu, 25 May 2023 19:08:56 +0530 Subject: [PATCH 217/277] AC-8834::2.4.7-Beta1-Composer Integration Test Failures-PHP 8.2-fixes for static test failures --- .../Backend/Catalog/Url/Rewrite/SuffixTest.php | 1 + .../Framework/ObjectManager/ObjectManagerTest.php | 12 ++++++------ .../testsuite/Magento/Framework/ProfilerTest.php | 2 -- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php index 8bb5b83b5bd1c..8c32cb192ad32 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php @@ -32,6 +32,7 @@ * @magentoAppArea adminhtml * @magentoDbIsolation enabled * @magentoAppIsolation enabled + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class SuffixTest extends TestCase { diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php index 5947368e197e6..b073de4ca2d18 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php @@ -12,25 +12,25 @@ class ObjectManagerTest extends \PHPUnit\Framework\TestCase /**#@+ * Test class with type error */ - const TEST_CLASS_WITH_TYPE_ERROR = \Magento\Framework\ObjectManager\TestAsset\ConstructorWithTypeError::class; + public const TEST_CLASS_WITH_TYPE_ERROR = \Magento\Framework\ObjectManager\TestAsset\ConstructorWithTypeError::class; /**#@+ * Test classes for basic instantiation */ - const TEST_CLASS = \Magento\Framework\ObjectManager\TestAsset\Basic::class; + public const TEST_CLASS = \Magento\Framework\ObjectManager\TestAsset\Basic::class; - const TEST_CLASS_INJECTION = \Magento\Framework\ObjectManager\TestAsset\BasicInjection::class; + public const TEST_CLASS_INJECTION = \Magento\Framework\ObjectManager\TestAsset\BasicInjection::class; /**#@-*/ /**#@+ * Test classes and interface to test preferences */ - const TEST_INTERFACE = \Magento\Framework\ObjectManager\TestAsset\TestAssetInterface::class; + public const TEST_INTERFACE = \Magento\Framework\ObjectManager\TestAsset\TestAssetInterface::class; - const TEST_INTERFACE_IMPLEMENTATION = \Magento\Framework\ObjectManager\TestAsset\InterfaceImplementation::class; + public const TEST_INTERFACE_IMPLEMENTATION = \Magento\Framework\ObjectManager\TestAsset\InterfaceImplementation::class; - const TEST_CLASS_WITH_INTERFACE = \Magento\Framework\ObjectManager\TestAsset\InterfaceInjection::class; + public const TEST_CLASS_WITH_INTERFACE = \Magento\Framework\ObjectManager\TestAsset\InterfaceInjection::class; /**#@-*/ diff --git a/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php b/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php index ef23ecbf9b2f6..df400561e2ffa 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php @@ -1,7 +1,5 @@ <?php /** - * Test case for \Magento\Framework\Profiler - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ From b98afe6f8b65a3ab244c51eb2f0eb33fdc696750 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Fri, 26 May 2023 09:58:35 +0530 Subject: [PATCH 218/277] Removed billing agreement tests and related files --- ...llingAgreementPayPalPaymentActionGroup.xml | 22 ----- .../AdminBillingAgreementSection.xml | 13 --- .../StorefrontBillingAgreementSection.xml | 19 ---- ...llingAgreementFromCustomersAccountTest.xml | 86 ------------------- 4 files changed, 140 deletions(-) delete mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml delete mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml delete mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml delete mode 100644 app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml deleted file mode 100644 index 1f90ef9f3c0c2..0000000000000 --- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/BillingAgreementPayPalPaymentActionGroup.xml +++ /dev/null @@ -1,22 +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="BillingAgreementPayPalPaymentActionGroup"> - <arguments> - <argument name="credentials" defaultValue="_CREDS"/> - </arguments> - <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/> - <click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/> - <waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/> - <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/> - <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="clickLogin"/> - <waitForPageLoad stepKey="waitForLoginPageLoad"/> - - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml deleted file mode 100644 index c138a5790859e..0000000000000 --- a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/AdminBillingAgreementSection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?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="AdminBillingAgreementSection"> - <element name="billingAgreementId" type="text" selector=".//*[@id='customer_edit_tab_agreements_table']//tbody/tr[1]/td[2]"/> - </section> -</sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml deleted file mode 100644 index edb22ad7bcbbb..0000000000000 --- a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontBillingAgreementSection.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?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="StorefrontBillingAgreementSection"> - <element name="billingAgreementDropdown" type="select" selector="#payment_method"/> - <element name="createButton" type="button" selector=".//*[@type='submit']/span[contains(text(),'Create')]"/> - <element name="expandLogin" type="button" selector="#loadLogin"/> - <element name="loginButton" type="button" selector="#submitLogin"/> - <element name="agreeAndContinue" type="button" selector="#continue"/> - <element name="billingAgreementId" type="text" selector=".//td[@class='col id']"/> - <element name="successMessageNew" type="text" selector=".//*[@role='alert']//div" /> - </section> -</sections> \ No newline at end of file diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml deleted file mode 100644 index fe4ead627ec67..0000000000000 --- a/app/code/Magento/Paypal/Test/Mftf/Test/CreateBillingAgreementFromCustomersAccountTest.xml +++ /dev/null @@ -1,86 +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="CreateBillingAgreementFromCustomersAccountTest"> - <annotations> - <features value="PayPal"/> - <stories value="Billing Agreement"/> - <title value="Create Billing Agreement from customer's Account"/> - <description value="Create Billing Agreement from customer's Account"/> - <severity value="MAJOR"/> - <testCaseId value="AC-5101"/> - <group value="paypal"/> - </annotations> - <before> - <!--Enable free shipping method --> - <magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/> - - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <!-- New Customer --> - <createData entity="Simple_US_Customer" stepKey="createCustomer"> - <field key="firstname">John1</field> - <field key="lastname">Doe1</field> - </createData> - <actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress"> - <argument name="credentials" value="SamplePaypalExpressConfig2"/> - </actionGroup> - <actionGroup ref="AdminPayPalExpressCheckoutEnableBillingAgreementActionGroup" stepKey="enableBillingAgreement"> - <argument name="countryCode" value="us"/> - </actionGroup> - </before> - <after> - <magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/> - <magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/> - <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/> - <magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/> - <magentoCLI command="config:set payment/hosted_pro/active 0" stepKey="disableHostedProExpress"/> - <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> - </after> - <!--Log in to Storefront as Customer--> - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser"> - <argument name="Customer" value="$$createCustomer$$"/> - </actionGroup> - <!-- Go to Billing Agreement Section and click on dropdown--> - <click selector="{{StorefrontCustomerSidebarSection.sidebarCurrentTab('Billing Agreements')}}" stepKey="clickOnMyOrders"/> - <selectOption selector ="{{StorefrontBillingAgreementSection.billingAgreementDropdown}}" userInput="PayPal Billing Agreement" stepKey="enableSandboxMode"/> - <click selector="{{StorefrontBillingAgreementSection.createButton}}" stepKey="clickCreateButton"/> - <reloadPage stepKey="refreshPage1"/> - <reloadPage stepKey="refreshPage2"/> - <reloadPage stepKey="refreshPage3"/> - <!-- Login to paypal to create Billing Agreement--> - <click selector="{{StorefrontBillingAgreementSection.expandLogin}}" stepKey="expandLogin"/> - <waitForPageLoad stepKey="waitToLoadLoginPage" time="10"/> - <click selector="{{StorefrontBillingAgreementSection.loginButton}}" stepKey="clickOnLogin"/> - <waitForPageLoad stepKey="waitForBillingAgreementPage" time="10"/> - <actionGroup ref="BillingAgreementPayPalPaymentActionGroup" stepKey="loginPaypal"/> - <click selector="{{StorefrontBillingAgreementSection.agreeAndContinue}}" stepKey="clickContinue"/> - <waitForPageLoad stepKey="waitForAgreeAndContinue"/> - <grabTextFrom selector="{{StorefrontBillingAgreementSection.billingAgreementId}}" stepKey="billingID"/> - <grabTextFrom selector="{{StorefrontBillingAgreementSection.successMessageNew}}" stepKey="grabSuccessMessage"/> - <waitForPageLoad stepKey="waitToGrabSuccessMessage" time="10"/> - <!-- Assert Billing Agreement ID in Storefront--> - <assertStringContainsString stepKey="AssertProduct2"> - <actualResult type="const">$grabSuccessMessage</actualResult> - <expectedResult type="string">$billingID</expectedResult> - </assertStringContainsString> - <!-- Go to "all customers" page in Admin --> - <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomersPage"/> - <!-- Filter by first customer email and Verify Billing Agreement ID--> - <actionGroup ref="AdminFilterCustomerGridByEmail" stepKey="filterByFullValue"> - <argument name="email" value="$$createCustomer.email$$"/> - </actionGroup><actionGroup ref="AdminClickFirstRowEditLinkOnCustomerGridActionGroup" stepKey="openCustomerEditPage"/> - <click selector="{{AdminCustomerInformationSection.billingAgreements}}" stepKey="clickOnBillingAgreements"/> - <grabTextFrom selector="{{AdminBillingAgreementSection.billingAgreementId}}" stepKey="grabBillingID"/> - <assertEquals stepKey="assertSecondProductMapPrice"> - <actualResult type="const">$grabBillingID</actualResult> - <expectedResult type="string">$billingID</expectedResult> - </assertEquals> - </test> -</tests> From 7241c9efe8b31c4c1afbc99896644a3b4dcc4243 Mon Sep 17 00:00:00 2001 From: Nishant Rana <glo04412@adobe.com> Date: Fri, 26 May 2023 19:20:46 +0530 Subject: [PATCH 219/277] AC-8838: Undefined array key GND under CarrierTest Integration Test Issue resolved --- .../Magento/Ups/Model/CarrierTest.php | 75 +++-- .../Ups/_files/ups_rates_response_option9.xml | 299 ++++++++++++++++++ 2 files changed, 349 insertions(+), 25 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Ups/_files/ups_rates_response_option9.xml diff --git a/dev/tests/integration/testsuite/Magento/Ups/Model/CarrierTest.php b/dev/tests/integration/testsuite/Magento/Ups/Model/CarrierTest.php index ce271e5102099..0e20b6723b6e0 100644 --- a/dev/tests/integration/testsuite/Magento/Ups/Model/CarrierTest.php +++ b/dev/tests/integration/testsuite/Magento/Ups/Model/CarrierTest.php @@ -14,13 +14,13 @@ use Magento\Framework\HTTP\AsyncClient\Response; use Magento\Framework\HTTP\AsyncClientInterface; use Magento\Quote\Model\Quote\Address\RateRequest; +use Magento\Quote\Model\Quote\Address\RateRequestFactory; use Magento\Quote\Model\Quote\Address\RateResult\Error; +use Magento\Shipping\Model\Shipment\Request; use Magento\TestFramework\Helper\Bootstrap; -use Magento\Quote\Model\Quote\Address\RateRequestFactory; use Magento\TestFramework\HTTP\AsyncClientInterfaceMock; -use PHPUnit\Framework\TestCase; use PHPUnit\Framework\MockObject\MockObject; -use Magento\Shipping\Model\Shipment\Request; +use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; /** @@ -113,29 +113,54 @@ public function testGetShipConfirmUrlLive() } /** - * Collect free rates. + * Collect rates for UPS Ground method. * * @magentoConfigFixture current_store carriers/ups/active 1 - * @magentoConfigFixture current_store carriers/ups/type UPS - * @magentoConfigFixture current_store carriers/ups/allowed_methods 1DA,GND - * @magentoConfigFixture current_store carriers/ups/free_method GND + * @magentoConfigFixture current_store carriers/ups/type UPS_XML + * @magentoConfigFixture current_store carriers/ups/allowed_methods 03 + * @magentoConfigFixture current_store carriers/ups/free_method 03 + * @magentoConfigFixture default_store carriers/ups/shipper_number 12345 + * @magentoConfigFixture default_store carriers/ups/origin_shipment Shipments Originating in the United States + * @magentoConfigFixture default_store carriers/ups/username user + * @magentoConfigFixture default_store carriers/ups/password pass + * @magentoConfigFixture default_store carriers/ups/access_license_number acn + * @magentoConfigFixture default_store carriers/ups/debug 1 + * @magentoConfigFixture default_store currency/options/allow USD,EUR + * @magentoConfigFixture default_store currency/options/base USD */ public function testCollectFreeRates() { - $rateRequest = Bootstrap::getObjectManager()->get(RateRequestFactory::class)->create(); - $rateRequest->setDestCountryId('US'); - $rateRequest->setDestRegionId('CA'); - $rateRequest->setDestPostcode('90001'); - $rateRequest->setPackageQty(1); - $rateRequest->setPackageWeight(1); - $rateRequest->setFreeMethodWeight(0); - $rateRequest->setLimitCarrier($this->carrier::CODE); - $rateRequest->setFreeShipping(true); - $rateResult = $this->carrier->collectRates($rateRequest); - $result = $rateResult->asArray(); - $methods = $result[$this->carrier::CODE]['methods']; - $this->assertEquals(0, $methods['GND']['price']); - $this->assertNotEquals(0, $methods['1DA']['price']); + $request = Bootstrap::getObjectManager()->create( + RateRequest::class, + [ + 'data' => [ + 'dest_country' => 'US', + 'dest_postal' => '90001', + 'package_weight' => '1', + 'package_qty' => '1', + 'free_method_weight' => '5', + 'product' => '11', + 'action' => 'Rate', + 'unit_measure' => 'KGS', + 'free_shipping' => '1', + 'base_currency' => new DataObject(['code' => 'USD']) + ] + ] + ); + //phpcs:disable Magento2.Functions.DiscouragedFunction + $this->httpClient->nextResponses( + [ + new Response( + 200, + [], + file_get_contents(__DIR__ . "/../_files/ups_rates_response_option9.xml") + ) + ] + ); + + $rates = $this->carrier->collectRates($request)->getAllRates(); + $this->assertEquals('19.19', $rates[0]->getPrice()); + $this->assertEquals('03', $rates[0]->getMethod()); } /** @@ -181,7 +206,7 @@ public function testCollectRates(int $negotiable, int $tax, int $responseId, str new Response( 200, [], - file_get_contents(__DIR__ ."/../_files/ups_rates_response_option$responseId.xml") + file_get_contents(__DIR__ . "/../_files/ups_rates_response_option$responseId.xml") ) ] ); @@ -283,9 +308,9 @@ public function collectRatesDataProvider() public function testRequestToShipment(): void { //phpcs:disable Magento2.Functions.DiscouragedFunction - $expectedShipmentRequest = file_get_contents(__DIR__ .'/../_files/ShipmentConfirmRequest.xml'); - $shipmentResponse = file_get_contents(__DIR__ .'/../_files/ShipmentConfirmResponse.xml'); - $acceptResponse = file_get_contents(__DIR__ .'/../_files/ShipmentAcceptResponse.xml'); + $expectedShipmentRequest = file_get_contents(__DIR__ . '/../_files/ShipmentConfirmRequest.xml'); + $shipmentResponse = file_get_contents(__DIR__ . '/../_files/ShipmentConfirmResponse.xml'); + $acceptResponse = file_get_contents(__DIR__ . '/../_files/ShipmentAcceptResponse.xml'); //phpcs:enable Magento2.Functions.DiscouragedFunction $this->httpClient->nextResponses( [ diff --git a/dev/tests/integration/testsuite/Magento/Ups/_files/ups_rates_response_option9.xml b/dev/tests/integration/testsuite/Magento/Ups/_files/ups_rates_response_option9.xml new file mode 100644 index 0000000000000..2e5c4bc0ddbfd --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Ups/_files/ups_rates_response_option9.xml @@ -0,0 +1,299 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<RatingServiceSelectionResponse> + <Response> + <TransactionReference> + <CustomerContext>Rating and Service</CustomerContext> + <XpciVersion>1.0</XpciVersion> + </TransactionReference> + <ResponseStatusCode>1</ResponseStatusCode> + <ResponseStatusDescription>Success</ResponseStatusDescription> + </Response> + <RatedShipment> + <Service> + <Code>12</Code> + </Service> + <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>43.19</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>43.19</MonetaryValue> + </TotalCharges> + <GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery> + <ScheduledDeliveryTime /> + <RatedPackage> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>43.19</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>43.19</MonetaryValue> + </TotalCharges> + <Weight>20.0</Weight> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + </RatedPackage> + </RatedShipment> + <RatedShipment> + <Service> + <Code>14</Code> + </Service> + <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>122.34</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>122.34</MonetaryValue> + </TotalCharges> + <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery> + <ScheduledDeliveryTime>8:00 A.M.</ScheduledDeliveryTime> + <RatedPackage> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>122.34</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>122.34</MonetaryValue> + </TotalCharges> + <Weight>20.0</Weight> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + </RatedPackage> + </RatedShipment> + <RatedShipment> + <Service> + <Code>03</Code> + </Service> + <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>19.19</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>19.19</MonetaryValue> + </TotalCharges> + <GuaranteedDaysToDelivery /> + <ScheduledDeliveryTime /> + <RatedPackage> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>19.19</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>19.19</MonetaryValue> + </TotalCharges> + <Weight>20.0</Weight> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + </RatedPackage> + </RatedShipment> + <RatedShipment> + <Service> + <Code>13</Code> + </Service> + <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>82.24</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>82.24</MonetaryValue> + </TotalCharges> + <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery> + <ScheduledDeliveryTime /> + <RatedPackage> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>82.24</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>82.24</MonetaryValue> + </TotalCharges> + <Weight>20.0</Weight> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + </RatedPackage> + </RatedShipment> + <RatedShipment> + <Service> + <Code>01</Code> + </Service> + <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>88.14</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>88.14</MonetaryValue> + </TotalCharges> + <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery> + <ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime> + <RatedPackage> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>88.14</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>88.14</MonetaryValue> + </TotalCharges> + <Weight>20.0</Weight> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + </RatedPackage> + </RatedShipment> + <RatedShipment> + <Service> + <Code>02</Code> + </Service> + <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>57.11</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>57.11</MonetaryValue> + </TotalCharges> + <GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery> + <ScheduledDeliveryTime /> + <RatedPackage> + <TransportationCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>57.11</MonetaryValue> + </TransportationCharges> + <ServiceOptionsCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>0.00</MonetaryValue> + </ServiceOptionsCharges> + <TotalCharges> + <CurrencyCode>USD</CurrencyCode> + <MonetaryValue>57.11</MonetaryValue> + </TotalCharges> + <Weight>20.0</Weight> + <BillingWeight> + <UnitOfMeasurement> + <Code>LBS</Code> + </UnitOfMeasurement> + <Weight>20.0</Weight> + </BillingWeight> + </RatedPackage> + </RatedShipment> +</RatingServiceSelectionResponse> From 206b70aab86d20cbbdbab6edf1434c90eac0e063 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Fri, 26 May 2023 13:40:22 -0500 Subject: [PATCH 220/277] AC-8862: Config path which contains capital letters doesn't return value --- lib/internal/Magento/Framework/App/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index e5d5101d8f96a..4560c389d7627 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -125,7 +125,7 @@ public function clean() */ public function get($configType, $path = '', $default = null) { - $path = strtolower($path); + //$path = strtolower($path); $result = null; if (isset($this->types[$configType])) { $result = $this->types[$configType]->get($path); From b16b6d5fe6e3d5f67df8438952c895aee0caa7cc Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Fri, 26 May 2023 16:23:55 -0500 Subject: [PATCH 221/277] AC-8862: Config path which contains capital letters doesn't return value --- lib/internal/Magento/Framework/App/Config.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index 4560c389d7627..5b3774ae6baea 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -125,7 +125,6 @@ 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); From af387ebbc458af26410357ace6aa49ea1de2ce07 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 29 May 2023 11:17:36 +0300 Subject: [PATCH 222/277] AC-8862: fix unit test --- lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 af3d1064ee9eeb4d605ee3b1c819aec4c8516600 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 29 May 2023 16:29:24 +0300 Subject: [PATCH 223/277] AC-8862: revert fix from ACP2E-1512 --- .../Reader/Source/Deployed/SettingChecker.php | 8 +- .../Source/Deployed/SettingCheckerTest.php | 10 -- .../App/Config/Source/RuntimeConfigSource.php | 2 +- .../Magento/Store/App/Config/Type/Scopes.php | 2 +- .../Store/Model/Config/Processor/Fallback.php | 29 +--- .../Config/Source/RuntimeConfigSourceTest.php | 69 +------- .../Model/Config/Processor/FallbackTest.php | 154 ------------------ lib/internal/Magento/Framework/App/Config.php | 7 +- .../App/Config/ScopeCodeResolver.php | 5 +- .../Unit/Config/ScopeCodeResolverTest.php | 2 +- .../Framework/App/Test/Unit/ConfigTest.php | 4 +- 11 files changed, 20 insertions(+), 272 deletions(-) delete mode 100644 app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php 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 48c53f8201bb2..0d56aca14fb0a 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,12 +102,8 @@ public function getPlaceholderValue($path, $scope, $scopeCode = null) public function getEnvValue($placeholder) { // phpcs:disable Magento2.Security.Superglobal - $environment = []; - foreach ($_ENV as $key => $value) { - $environment[strtolower($key)] = $value; - } - if ($this->placeholder->isApplicable($placeholder) && isset($environment[strtolower($placeholder)])) { - return $environment[strtolower($placeholder)]; + if ($this->placeholder->isApplicable($placeholder) && isset($_ENV[$placeholder])) { + return $_ENV[$placeholder]; } // phpcs:enable 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 157d740d524c1..a0158a6b473df 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,16 +69,6 @@ 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 diff --git a/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php b/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php index 80aaa31b184fe..b8b0ede43c70d 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[strtolower($entity[$keyField])] = $entity; + $data[$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 6bfed343f4c04..ea1f86a2239ff 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(strtolower($path)); + return $this->data->getData($path); } /** diff --git a/app/code/Magento/Store/Model/Config/Processor/Fallback.php b/app/code/Magento/Store/Model/Config/Processor/Fallback.php index 1b1afaae6c009..537802d312eed 100644 --- a/app/code/Magento/Store/Model/Config/Processor/Fallback.php +++ b/app/code/Magento/Store/Model/Config/Processor/Fallback.php @@ -11,7 +11,10 @@ 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 @@ -111,13 +114,6 @@ 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']; @@ -143,12 +139,6 @@ 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']; @@ -201,18 +191,5 @@ 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/App/Config/Source/RuntimeConfigSourceTest.php b/app/code/Magento/Store/Test/Unit/App/Config/Source/RuntimeConfigSourceTest.php index 96990f72d6de1..9645aa2d6b808 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,73 +68,12 @@ public function testGet() ->getMock(); $selectMock->expects($this->any())->method('from')->willReturnSelf(); $this->connection->expects($this->any())->method('select')->willReturn($selectMock); - $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->connection->expects($this->any())->method('fetchAll')->willReturn([]); $this->assertEquals( [ - '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' - ] - ], + 'websites' => [], + 'groups' => [], + 'stores' => [], ], $this->configSource->get() ); 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 deleted file mode 100644 index 7846186f42970..0000000000000 --- a/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php +++ /dev/null @@ -1,154 +0,0 @@ -<?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 e8dddeb08468f..5d8d50bcb909e 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -1,5 +1,7 @@ <?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. */ @@ -10,14 +12,14 @@ use Magento\Framework\App\Config\ScopeConfigInterface; /** - * Application configuration object. Used to access configuration when application is initialized and installed. + * Class Config */ class Config implements ScopeConfigInterface { /** * Config cache tag */ - public const CACHE_TAG = 'CONFIG'; + const CACHE_TAG = 'CONFIG'; /** * @var ScopeCodeResolver @@ -125,7 +127,6 @@ 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 fced047ed42d0..681af35944695 100644 --- a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php +++ b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php @@ -59,10 +59,9 @@ public function resolve($scopeType, $scopeCode) $scopeCode = $resolverScopeCode; } - $this->resolvedScopeCodes[$scopeType][$scopeCode] = - is_null($resolverScopeCode) ? null : strtolower($resolverScopeCode); + $this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode; - return $this->resolvedScopeCodes[$scopeType][$scopeCode]; + return $resolverScopeCode; } /** 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 6da8ed2f039da..592ae69419723 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(strtolower($scopeCode), $this->scopeCodeResolver->resolve($scopeType, $scopeId)); + $this->assertEquals($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 73e171fdc4859..90d3aadcc84b3 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 6e6b3942b926f4de417de1e877a6fe8927dc653d Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 29 May 2023 17:33:20 +0300 Subject: [PATCH 224/277] AC-8862: fix static errors --- lib/internal/Magento/Framework/App/Config.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index f092324649e74..514b0f4f88de9 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -1,6 +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 +11,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 @@ -134,15 +133,4 @@ public function get($configType, $path = '', $default = null) return $result !== null ? $result : $default; } - - /** - * Disable show internals with var_dump - * - * @see https://www.php.net/manual/en/language.oop5.magic.php#object.debuginfo - * @return array - */ - public function __debugInfo() - { - return []; - } } From 492bdfae4155871748f56b5401683d0921597d3c Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 29 May 2023 17:34:33 +0300 Subject: [PATCH 225/277] AC-8862: fix static errors --- lib/internal/Magento/Framework/App/Config.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index 514b0f4f88de9..32a1cd4948d66 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -133,4 +133,15 @@ public function get($configType, $path = '', $default = null) return $result !== null ? $result : $default; } + + /** + * Disable show internals with var_dump + * + * @see https://www.php.net/manual/en/language.oop5.magic.php#object.debuginfo + * @return array + */ + public function __debugInfo() + { + return []; + } } From f26fcf5011894e5a8388204f9e11b109dfdb378f Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Tue, 9 May 2023 09:37:36 -0500 Subject: [PATCH 226/277] ACPT-1194 ... part2 remove ResetAfterRequestInterface from SearchCriteriaBuilder.php because it is taken care of in parent class --- .../Magento/Framework/Api/SearchCriteriaBuilder.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php b/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php index 1ec40a7d39b6b..6d5f6ca436f25 100644 --- a/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php @@ -16,7 +16,7 @@ * * @api */ -class SearchCriteriaBuilder extends AbstractSimpleObjectBuilder implements ResetAfterRequestInterface +class SearchCriteriaBuilder extends AbstractSimpleObjectBuilder { /** * @var FilterGroupBuilder @@ -148,12 +148,4 @@ public function setCurrentPage($currentPage) { return $this->_set(SearchCriteria::CURRENT_PAGE, $currentPage); } - - /** - * @inheritDoc - */ - public function _resetState(): void - { - $this->data = []; - } } From 340c7eab7834c88b2d0b053e3b0a6c589bf1e57d Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Tue, 9 May 2023 22:12:10 -0500 Subject: [PATCH 227/277] ACPT-1194 ... part2 Now making all Collections reset after request... WOW! --- .../Model/ResourceModel/Block/Collection.php | 10 +++++++++ .../Model/ResourceModel/Page/Collection.php | 10 +++++++++ .../ResourceModel/Address/Grid/Collection.php | 9 ++++++++ .../Model/ResourceModel/Queue/Collection.php | 9 ++++++++ .../ResourceModel/Subscriber/Collection.php | 16 ++++++++++++++ .../Model/ResourceModel/Rule/Collection.php | 9 ++++++++ .../Framework/Api/SearchCriteriaBuilder.php | 1 - .../Magento/Framework/Data/Collection.php | 7 +++++++ .../Framework/Data/Collection/AbstractDb.php | 16 ++++++++++++++ .../Db/Collection/AbstractCollection.php | 21 +++++++++++++++++++ 10 files changed, 107 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php b/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php index f22367393030a..9e97bef526407 100644 --- a/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php +++ b/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php @@ -58,6 +58,16 @@ protected function _construct() $this->_map['fields']['block_id'] = 'main_table.block_id'; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_map['fields']['store'] = 'store_table.store_id'; + $this->_map['fields']['block_id'] = 'main_table.block_id'; + } + /** * Returns pairs block_id - title * diff --git a/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php b/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php index 96886a995b1c9..b7b4bf2db144d 100644 --- a/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php +++ b/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php @@ -51,6 +51,16 @@ protected function _construct() $this->_map['fields']['store'] = 'store_table.store_id'; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_map['fields']['page_id'] = 'main_table.page_id'; + $this->_map['fields']['store'] = 'store_table.store_id'; + } + /** * Set first store flag * diff --git a/app/code/Magento/Customer/Model/ResourceModel/Address/Grid/Collection.php b/app/code/Magento/Customer/Model/ResourceModel/Address/Grid/Collection.php index c7b44288bc85f..ffb5f41a40687 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/Address/Grid/Collection.php +++ b/app/code/Magento/Customer/Model/ResourceModel/Address/Grid/Collection.php @@ -94,6 +94,15 @@ public function __construct( ); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_idFieldName = 'entity_id'; + } + /** * @inheritdoc */ diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php index f4e72c61953f0..e7b5c9d0ee365 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php @@ -69,6 +69,15 @@ protected function _construct() $this->_init(\Magento\Newsletter\Model\Queue::class, \Magento\Newsletter\Model\ResourceModel\Queue::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_map['fields']['queue_id'] = 'main_table.queue_id'; + } + /** * Joins templates information * diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php index 64f6c066f01b6..a83b05c19e6c0 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php @@ -107,6 +107,22 @@ protected function _construct() $this->_map['fields']['store_id'] = 'main_table.store_id'; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_map['fields']['type'] = $this->getResource()->getConnection()->getCheckSql( + 'main_table.customer_id = 0', + 1, + 2 + ); + $this->_map['fields']['website_id'] = 'store.website_id'; + $this->_map['fields']['group_id'] = 'store.group_id'; + $this->_map['fields']['store_id'] = 'main_table.store_id'; + } + /** * Set loading mode subscribers by queue * diff --git a/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php b/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php index c7a3442306981..a78aa2590a6eb 100644 --- a/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php +++ b/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php @@ -96,6 +96,15 @@ protected function _construct() $this->_map['fields']['rule_id'] = 'main_table.rule_id'; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_map['fields']['rule_id'] = 'main_table.rule_id'; + } + /** * Map data for associated entities * diff --git a/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php b/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php index 6d5f6ca436f25..e5cf9d7c54886 100644 --- a/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php @@ -9,7 +9,6 @@ namespace Magento\Framework\Api; use Magento\Framework\Api\Search\FilterGroupBuilder; -use Magento\Framework\ObjectManager\ResetAfterRequestInterface; /** * Builder for SearchCriteria Service Data Object diff --git a/lib/internal/Magento/Framework/Data/Collection.php b/lib/internal/Magento/Framework/Data/Collection.php index 8bda62709897b..9432a9db9db4f 100644 --- a/lib/internal/Magento/Framework/Data/Collection.php +++ b/lib/internal/Magento/Framework/Data/Collection.php @@ -933,5 +933,12 @@ public function __wakeup() public function _resetState(): void { $this->clear(); + // TODO: Is it safe to move the following into clear() ? + $this->_orders = []; + $this->_filters = []; + $this->_isFiltersRendered = false; + $this->_curPage = 1; + $this->_pageSize = false; + $this->_flags = []; } } diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index b829f063ac2de..0c6b29f76e678 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -119,6 +119,22 @@ public function __construct( $this->_logger = $logger; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->setConnection($this->_conn); + $this->_idFieldName = null; + $this->_bindParams = []; + $this->_data = null; + $this->map = null; + $this->_fetchStmt = null; + $this->_isOrdersRendered = false; + $this->extensionAttributesJoinProcessor = null; + } + /** * Get resource instance. * diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php index 4b8c651dfaa1c..4e335e62d8f1a 100644 --- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php +++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php @@ -145,6 +145,27 @@ protected function _construct() //phpcs:ignore Magento2.CodeAnalysis.EmptyBlock { } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_model = null; + $this->_resourceModel = null; + $this->_fieldsToSelect = null; + $this->expressionFieldsToSelect = []; + $this->_initialFieldsToSelect = null; + $this->_fieldsToSelectChanged = false; + $this->_joinedTables = []; + $this->_mainTable = null; + $this->_resetItemsDataChanged = false; + $this->_eventPrefix = ''; + $this->_eventObject = ''; + $this->_construct(); + $this->_initSelect(); + } + /** * Retrieve main table * From 3f7c56ca9892d96d41c9649439e31cd940faf39b Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 10 May 2023 09:25:34 -0500 Subject: [PATCH 228/277] ACPT-1194-part2 Resetting state in more Collection classes People shouldn't be dependency injecting collection classes as if they were service classes. But they do anyways! So, we have to reset them. :-( --- .../ResourceModel/Selection/Collection.php | 12 +++++- .../ResourceModel/Category/Collection.php | 12 ++++++ .../Collection/AbstractCollection.php | 9 +++++ .../ResourceModel/Product/Collection.php | 39 ++++++++++++++++++- .../Entity/Collection/AbstractCollection.php | 14 ++++++- .../Review/Product/Collection.php | 11 ++++++ .../Framework/Data/Collection/AbstractDb.php | 4 +- 7 files changed, 93 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php index 303c33b571d35..96a40c7aea1b8 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php @@ -128,7 +128,6 @@ public function __construct( $metadataPool, $tableMaintainer ); - $this->stockItem = $stockItem ?? ObjectManager::getInstance()->get(\Magento\CatalogInventory\Model\ResourceModel\Stock\Item::class); } @@ -145,6 +144,17 @@ protected function _construct() $this->_selectionTable = $this->getTable('catalog_product_bundle_selection'); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->itemPrototype = null; + $this->catalogRuleProcessor = null; + $this->websiteScopePriceJoined = false; + } + /** * Set store id for each collection item when collection was loaded. * phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 56fb7290b81a6..9df0a3a9b3831 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -137,6 +137,18 @@ protected function _construct() $this->_init(Category::class, \Magento\Catalog\Model\ResourceModel\Category::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_productTable = null; + $this->_productStoreId = null; + $this->_productWebsiteTable = null; + $this->_loadWithProductCount = false; + } + /** * Add Id filter * diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php index a121648b7acba..89dacf5361a69 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php @@ -76,6 +76,15 @@ public function __construct( ); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_storeId = null; + } + /** * Retrieve Entity Primary Key * diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index 79636c55c0f56..4226fdb4236b2 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -102,6 +102,11 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac */ protected $_productLimitationFilters; + /** + * @var ProductLimitationFactory + */ + private $productLimitationFactory; + /** * Category product count select * @@ -354,10 +359,10 @@ public function __construct( $this->_resourceHelper = $resourceHelper; $this->dateTime = $dateTime; $this->_groupManagement = $groupManagement; - $productLimitationFactory = $productLimitationFactory ?: ObjectManager::getInstance()->get( + $this->productLimitationFactory = $productLimitationFactory ?: ObjectManager::getInstance()->get( \Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory::class ); - $this->_productLimitationFilters = $productLimitationFactory->create(); + $this->_productLimitationFilters = $this->productLimitationFactory->create(); $this->metadataPool = $metadataPool ?: ObjectManager::getInstance()->get(MetadataPool::class); parent::__construct( $entityFactory, @@ -387,6 +392,36 @@ public function __construct( ->get(Gallery::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_flatEnabled = []; + $this->_initTables(); + $this->_addUrlRewrite = false; + $this->_urlRewriteCategory = ''; + $this->_addFinalPrice = false; + $this->_allIdsCache = null; + $this->_addTaxPercents = false; + $this->_productLimitationFilters = $this->productLimitationFactory->create(); + $this->_productCountSelect = null; + $this->_isWebsiteFilter = false; + $this->_priceDataFieldFilters = []; + $this->_priceExpression = null; + $this->_additionalPriceExpression = null; + $this->_maxPrice = null; + $this->_minPrice = null; + $this->_priceStandardDeviation = null; + $this->_pricesCount = null; + $this->_catalogPreparePriceSelect = null; + $this->needToAddWebsiteNamesToResult = null; + $this->linkField = null; + $this->backend = null; + $this->emptyItem = null; + } + /** * Get cloned Select after dispatching 'catalog_prepare_price_select' event * diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index abd817940956f..03b0e66013956 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -180,6 +180,18 @@ protected function _construct() { } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_itemsById = []; + $this->_staticFields = []; + $this->_entity = null; + $this->_reset(); + } + /** * Retrieve table name * @@ -1597,14 +1609,12 @@ protected function _afterLoad() protected function _reset() { parent::_reset(); - $this->_selectEntityTypes = []; $this->_selectAttributes = []; $this->_filterAttributes = []; $this->_joinEntities = []; $this->_joinAttributes = []; $this->_joinFields = []; - return $this; } diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php index 1fb7e7df2461f..f463f7a639629 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php @@ -159,6 +159,17 @@ protected function _construct() $this->_initTables(); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_entitiesAlias = []; + $this->_addStoreDataFlag = false; + $this->_storesIds = []; + } + /** * Initialize select * diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index 0c6b29f76e678..42e2ba0949b76 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -125,14 +125,12 @@ public function __construct( public function _resetState(): void { parent::_resetState(); - $this->setConnection($this->_conn); + $this->_reset(); $this->_idFieldName = null; $this->_bindParams = []; - $this->_data = null; $this->map = null; $this->_fetchStmt = null; $this->_isOrdersRendered = false; - $this->extensionAttributesJoinProcessor = null; } /** From f510925fbbcce0986e7902a1256c115872e93fe9 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 10 May 2023 10:37:40 -0500 Subject: [PATCH 229/277] ACPT-1194 ... part2 ... more Collection resetting... --- .../Product/Compare/Item/Collection.php | 12 ++++++++++++ .../Product/Link/Product/Collection.php | 15 +++++++++++++++ .../Model/ResourceModel/Fulltext/Collection.php | 14 ++++++++++++++ .../Model/ResourceModel/Search/Collection.php | 10 ++++++++++ 4 files changed, 51 insertions(+) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php index 76f566a364769..2f6655069d00e 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php @@ -150,6 +150,18 @@ protected function _construct() $this->_initTables(); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_customerId = 0; + $this->_visitorId = 0; + $this->listId = 0; + $this->_comparableAttributes = null; + } + /** * Set customer filter to collection * diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection.php index bca919e700364..cac549e0a17c9 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection.php @@ -183,6 +183,21 @@ public function __construct( } } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_product = null; + $this->_linkModel = null; + $this->_linkTypeId = null; + $this->_isStrongMode = null; + $this->_hasLinkFilter = false; + $this->productIds = null; + $this->linkField = null; + } + /** * Declare link model and initialize type attributes join * diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php index 9b66606d37a9e..c33db9060d834 100644 --- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php @@ -219,6 +219,20 @@ public function __construct( ->get(DefaultFilterStrategyApplyChecker::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->queryText = null; + $this->search = null; + $this->searchCriteriaBuilder = null; + $this->searchResult = null; + $this->filterBuilder = null; + $this->searchOrders = null; + } + /** * Get search. * diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php index 7e9be408a3850..943ad76bcd6d2 100644 --- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php @@ -119,6 +119,16 @@ public function __construct( $this->indexUsageEnforcements = $indexUsageEnforcements; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_attributesCollection = null; + $this->_searchQuery = null; + } + /** * Add search query filter * From 23be3be55c82bce8a7936b06f68dc8bb7db133b5 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 10 May 2023 12:58:57 -0500 Subject: [PATCH 230/277] ACPT-1194-part2 Don't call reset() method from _resetState() method in Collections! --- .../Catalog/Model/ResourceModel/Product/Collection.php | 2 +- .../Eav/Model/Entity/Collection/AbstractCollection.php | 7 ++++++- .../Magento/Framework/Data/Collection/AbstractDb.php | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index 4226fdb4236b2..6756aac0786a9 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -399,7 +399,6 @@ public function _resetState(): void { parent::_resetState(); $this->_flatEnabled = []; - $this->_initTables(); $this->_addUrlRewrite = false; $this->_urlRewriteCategory = ''; $this->_addFinalPrice = false; @@ -420,6 +419,7 @@ public function _resetState(): void $this->linkField = null; $this->backend = null; $this->emptyItem = null; + $this->_construct(); } /** diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index 03b0e66013956..2b2f7d991a098 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -189,7 +189,12 @@ public function _resetState(): void $this->_itemsById = []; $this->_staticFields = []; $this->_entity = null; - $this->_reset(); + $this->_selectEntityTypes = []; + $this->_selectAttributes = []; + $this->_filterAttributes = []; + $this->_joinEntities = []; + $this->_joinAttributes = []; + $this->_joinFields = []; } /** diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index 42e2ba0949b76..0c6b29f76e678 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -125,12 +125,14 @@ public function __construct( public function _resetState(): void { parent::_resetState(); - $this->_reset(); + $this->setConnection($this->_conn); $this->_idFieldName = null; $this->_bindParams = []; + $this->_data = null; $this->map = null; $this->_fetchStmt = null; $this->_isOrdersRendered = false; + $this->extensionAttributesJoinProcessor = null; } /** From 0bb4f53fe3f8b5137e47ea42dc094eefb62bce26 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Thu, 11 May 2023 12:28:58 -0500 Subject: [PATCH 231/277] ACPT-1194-part2 Reset Validators DON'T reset EAV's Attribute/Collection --- .../Eav/Model/ResourceModel/Attribute/Collection.php | 9 +++++++++ .../Magento/Eav/Model/Validator/Attribute/Data.php | 12 ++++++++++++ .../Framework/Validator/AbstractValidator.php | 12 +++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php index 7abb54e780f5f..5a60ecc8600d1 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php @@ -64,6 +64,15 @@ public function __construct( parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $eavConfig, $connection, $resource); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + /* Note: because Eav attribute loading takes significant performance, + we are not resetting it like other collections. */ + } + /** * Default attribute entity type code * diff --git a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php index 11adf5eac31fd..4175608db5f08 100644 --- a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php +++ b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php @@ -69,6 +69,18 @@ public function __construct( $this->ignoredAttributesByTypesList = $ignoredAttributesByTypesList; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_attributes = []; + $this->allowedAttributesList = []; + $this->deniedAttributesList = []; + $this->_data = []; + } + /** * Set list of attributes for validation in isValid method. * diff --git a/lib/internal/Magento/Framework/Validator/AbstractValidator.php b/lib/internal/Magento/Framework/Validator/AbstractValidator.php index c90092f64d95c..7b5c895685a3f 100644 --- a/lib/internal/Magento/Framework/Validator/AbstractValidator.php +++ b/lib/internal/Magento/Framework/Validator/AbstractValidator.php @@ -6,6 +6,7 @@ namespace Magento\Framework\Validator; use Laminas\Validator\Translator\TranslatorInterface; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; /** * Abstract validator class. @@ -14,7 +15,7 @@ * @api * @since 100.0.2 */ -abstract class AbstractValidator implements ValidatorInterface +abstract class AbstractValidator implements ValidatorInterface, ResetAfterRequestInterface { /** * @var TranslatorInterface|null @@ -31,6 +32,15 @@ abstract class AbstractValidator implements ValidatorInterface */ protected $_messages = []; + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->_translator = null; + $this->_messages = []; + } + /** * Set default translator instance * From 71927b33828d0f64b0c615839cbaaa7f5945f66b Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 17 May 2023 13:14:32 -0500 Subject: [PATCH 232/277] ACPT-1194-part2: resetting Magento/Quote/Model/ResourceModel/Quote/Item/Collection --- .../Model/ResourceModel/Quote/Item/Collection.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php b/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php index b59737bff988b..6e27625283bec 100644 --- a/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php +++ b/app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php @@ -127,6 +127,16 @@ protected function _construct() $this->_init(QuoteItem::class, ResourceQuoteItem::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_productIds = []; + $this->_quote = null; + } + /** * Retrieve store Id (From Quote) * From 810cd3fb7c886f3c0246c206d3984cf381a4edb7 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Mon, 22 May 2023 12:43:50 -0500 Subject: [PATCH 233/277] Adding more error info in TestCase/GraphQl/Client to help with debugging --- .../framework/Magento/TestFramework/TestCase/GraphQl/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php index 4cbaadf0773ae..1630eee8f8d64 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php @@ -225,7 +225,7 @@ private function processErrors($responseBodyArray, array $responseHeaders = [], } throw new ResponseContainsErrorsException( - 'GraphQL response contains errors: ' . $errorMessage, + 'GraphQL response contains errors: ' . $errorMessage . "\n" . var_export($responseBodyArray, true), $responseBodyArray, null, 0, From 446475f39352efe748fdbfbc99415f50e7f1d9eb Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Tue, 23 May 2023 08:40:06 -0500 Subject: [PATCH 234/277] Fix debugging when TestFramework's GraphQl Client gets non-JSON response --- .../Magento/TestFramework/TestCase/GraphQl/Client.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php index 1630eee8f8d64..a2e7fcb95a430 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php @@ -111,20 +111,21 @@ public function get(string $query, array $variables = [], string $operationName */ private function processResponse(string $response, array $responseHeaders = [], array $responseCookies = []) { - $responseArray = $this->json->jsonDecode($response); - + $responseArray = null; + try { + $responseArray = $this->json->jsonDecode($response); + } catch (\Exception $exception) { + // Note: We don't care about this exception because we have error checking bellow if it fails to decode. + } if (!is_array($responseArray)) { //phpcs:ignore Magento2.Exceptions.DirectThrow throw new \Exception('Unknown GraphQL response body: ' . $response); } - $this->processErrors($responseArray, $responseHeaders, $responseCookies); - if (!isset($responseArray['data'])) { //phpcs:ignore Magento2.Exceptions.DirectThrow throw new \Exception('Unknown GraphQL response body: ' . $response); } - return $responseArray['data']; } From b4f9b1f6f6b5b0d359c8933072820b5042efafef Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Tue, 23 May 2023 12:06:18 -0500 Subject: [PATCH 235/277] ACPT-1327 SortAttributeReader should use CollectionFactory instead of Collection This was causing config reload to fail. --- .../Model/Config/SortAttributeReader.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php b/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php index 215b28be0579c..50b2b53bfb4a0 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php +++ b/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php @@ -6,9 +6,11 @@ namespace Magento\CatalogGraphQl\Model\Config; +use Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection as AttributesCollection; +use Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory as AttributesCollectionFactory; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Config\ReaderInterface; use Magento\Framework\GraphQl\Schema\Type\Entity\MapperInterface; -use Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection as AttributesCollection; /** * Adds custom/eav attribute to catalog products sorting in the GraphQL config. @@ -31,20 +33,23 @@ class SortAttributeReader implements ReaderInterface private $mapper; /** - * @var AttributesCollection + * @var AttributesCollectionFactory */ - private $attributesCollection; + private $attributesCollectionFactory; /** * @param MapperInterface $mapper * @param AttributesCollection $attributesCollection + * @param AttributesCollectionFactory|null $attributesCollectionFactory */ public function __construct( MapperInterface $mapper, - AttributesCollection $attributesCollection + AttributesCollection $attributesCollection, + ?AttributesCollectionFactory $attributesCollectionFactory = null ) { $this->mapper = $mapper; - $this->attributesCollection = $attributesCollection; + $this->attributesCollectionFactory = $attributesCollectionFactory + ?? ObjectManager::getInstance()->get(AttributesCollectionFactory::class); } /** @@ -58,7 +63,8 @@ public function read($scope = null) : array { $map = $this->mapper->getMappedTypes(self::ENTITY_TYPE); $config =[]; - $attributes = $this->attributesCollection->addSearchableAttributeFilter()->addFilter('used_for_sort_by', 1); + $attributes = $this->attributesCollectionFactory->create() + ->addSearchableAttributeFilter()->addFilter('used_for_sort_by', 1); /** @var \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute */ foreach ($attributes as $attribute) { $attributeCode = $attribute->getAttributeCode(); @@ -73,7 +79,6 @@ public function read($scope = null) : array ]; } } - return $config; } } From 22a07ee399f5f3a2f4228e6389c598e95e9bab70 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Tue, 23 May 2023 16:32:58 -0500 Subject: [PATCH 236/277] ACPT-1327 adding resetState for Magento/SalesRule/Model/Validator --- app/code/Magento/SalesRule/Model/Validator.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php index abf34172c7296..14cc17690ef8e 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -8,6 +8,7 @@ use Laminas\Validator\ValidatorInterface; use Magento\Framework\App\ObjectManager; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; use Magento\Quote\Model\Quote; use Magento\Quote\Model\Quote\Address; use Magento\Quote\Model\Quote\Item\AbstractItem; @@ -28,7 +29,7 @@ * @method Validator setCustomerGroupId($id) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Validator extends \Magento\Framework\Model\AbstractModel +class Validator extends \Magento\Framework\Model\AbstractModel implements ResetAfterRequestInterface { /** * Rule source collection @@ -151,6 +152,18 @@ public function __construct( parent::__construct($context, $registry, $resource, $resourceCollection, $data); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->counter = 0; + $this->_skipActionsValidation = false; + $this->_rulesItemTotals = []; + $this->_isFirstTimeResetRun = true; + $this->_rules = null; + } + /** * Init validator * Init process load collection of rules for specific website, From fbf4a343660c35835a4bdb6d893d79e0cabbf909 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 24 May 2023 12:48:50 -0500 Subject: [PATCH 237/277] ACPT-1327 add _resetState for resetting HTTP client in Magento/Framework/HTTP/LaminasClient --- .../Magento/Framework/HTTP/LaminasClient.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/HTTP/LaminasClient.php b/lib/internal/Magento/Framework/HTTP/LaminasClient.php index 10bb4dd18c5ce..b90bc725b3fab 100644 --- a/lib/internal/Magento/Framework/HTTP/LaminasClient.php +++ b/lib/internal/Magento/Framework/HTTP/LaminasClient.php @@ -12,9 +12,10 @@ use Laminas\Http\Client; use Magento\Framework\HTTP\Adapter\Curl; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; use Traversable; -class LaminasClient extends Client +class LaminasClient extends Client implements ResetAfterRequestInterface { /** * Internal flag to allow decoding of request body @@ -37,6 +38,15 @@ public function __construct($uri = null, $options = null) parent::__construct($uri, $options); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->reset(); + } + + /** * Change value of internal flag to disable/enable custom prepare functionality * From 936dd10683790e01cc1b06170cfa53c66b1e49de Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 24 May 2023 13:26:30 -0500 Subject: [PATCH 238/277] ACPT-1327 adding more state to _resetState in Magento/Customer/Model/Session and Magento/Framework/Session/SessionManager --- app/code/Magento/Customer/Model/Session.php | 3 ++- lib/internal/Magento/Framework/Session/SessionManager.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php index f5a7cc0d124b3..ac306688cf09e 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -399,7 +399,8 @@ public function getCustomerGroupId() public function _resetState(): void { $this->_customer = null; - parent::_resetState(); // TODO: Change the autogenerated stub + $this->_isCustomerIdChecked = null; + parent::_resetState(); } /** diff --git a/lib/internal/Magento/Framework/Session/SessionManager.php b/lib/internal/Magento/Framework/Session/SessionManager.php index 6c008995bfe3f..21f578353ba4d 100644 --- a/lib/internal/Magento/Framework/Session/SessionManager.php +++ b/lib/internal/Magento/Framework/Session/SessionManager.php @@ -639,5 +639,6 @@ private function initIniOptions() public function _resetState(): void { session_write_close(); + $this->urlHostCache = []; } } From 0f58b3e613dc783cebabfc796729b9630e39223c Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 24 May 2023 14:19:44 -0500 Subject: [PATCH 239/277] ACPT-1327 more session resetState resetting --- app/code/Magento/Backend/Model/Auth/Session.php | 10 ++++++++++ app/code/Magento/Backend/Model/Session/Quote.php | 13 ++++++++++++- app/code/Magento/Checkout/Model/Session.php | 13 +++++++++++++ app/code/Magento/Customer/Model/Session.php | 3 +++ .../Magento/Framework/Session/SessionManager.php | 2 +- 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Backend/Model/Auth/Session.php b/app/code/Magento/Backend/Model/Auth/Session.php index e65caf13f2ea3..ec813472695d7 100644 --- a/app/code/Magento/Backend/Model/Auth/Session.php +++ b/app/code/Magento/Backend/Model/Auth/Session.php @@ -114,6 +114,16 @@ public function __construct( ); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_isFirstAfterLogin = null; + $this->acl = null; + } + /** * Refresh ACL resources stored in session * diff --git a/app/code/Magento/Backend/Model/Session/Quote.php b/app/code/Magento/Backend/Model/Session/Quote.php index ed0312874565c..b3067d3c98851 100644 --- a/app/code/Magento/Backend/Model/Session/Quote.php +++ b/app/code/Magento/Backend/Model/Session/Quote.php @@ -139,6 +139,17 @@ public function __construct( } } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_quote = null; + $this->_store = null; + $this->_order = null; + } + /** * Retrieve quote model object * @@ -154,7 +165,7 @@ public function getQuote() $this->_quote->setCustomerGroupId($customerGroupId); $this->_quote->setIsActive(false); $this->_quote->setStoreId($this->getStoreId()); - + $this->quoteRepository->save($this->_quote); $this->setQuoteId($this->_quote->getId()); $this->_quote = $this->quoteRepository->get($this->getQuoteId(), [$this->getStoreId()]); diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php index 0addbf069cba3..6bf3819054749 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -186,6 +186,19 @@ public function __construct( ->get(LoggerInterface::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_quote = null; + $this->_customer = null; + $this->_loadInactive = false; + $this->isLoading = false; + $this->_order = null; + } + /** * Set customer data. * diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php index ac306688cf09e..ec47afe8e065a 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -399,6 +399,9 @@ public function getCustomerGroupId() public function _resetState(): void { $this->_customer = null; + $this->_customerModel = null; + $this->setCustomerId(null); + $this->setCustomerGroupId($this->groupManagement->getNotLoggedInGroup()->getId()); $this->_isCustomerIdChecked = null; parent::_resetState(); } diff --git a/lib/internal/Magento/Framework/Session/SessionManager.php b/lib/internal/Magento/Framework/Session/SessionManager.php index 21f578353ba4d..5a6eea4cbef2c 100644 --- a/lib/internal/Magento/Framework/Session/SessionManager.php +++ b/lib/internal/Magento/Framework/Session/SessionManager.php @@ -639,6 +639,6 @@ private function initIniOptions() public function _resetState(): void { session_write_close(); - $this->urlHostCache = []; + static::$urlHostCache = []; } } From 8a4cd816047f898d75decef7f55e82e98599403d Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Thu, 25 May 2023 13:46:16 -0500 Subject: [PATCH 240/277] ACPT-1327 Resetting min quantity cache in Magento/CatalogInventory/Helper/Minsaleqty Resetting isQtyTypeIds in Magento/CatalogInventory/Model/Configuration --- .../Magento/CatalogInventory/Helper/Minsaleqty.php | 11 ++++++++++- .../CatalogInventory/Model/Configuration.php | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php b/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php index 96bf5bd965355..1ee8e1a97e89f 100644 --- a/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php +++ b/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php @@ -8,13 +8,14 @@ use Magento\Customer\Api\GroupManagementInterface; use Magento\Framework\App\ObjectManager; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; use Magento\Framework\Serialize\Serializer\Json; use Magento\Store\Model\Store; /** * MinSaleQty value manipulation helper */ -class Minsaleqty +class Minsaleqty implements ResetAfterRequestInterface { /** * Core store config @@ -61,6 +62,14 @@ public function __construct( $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class); } + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->minSaleQtyCache = []; + } + /** * Retrieve fixed qty value * diff --git a/app/code/Magento/CatalogInventory/Model/Configuration.php b/app/code/Magento/CatalogInventory/Model/Configuration.php index 8b0849c8874bc..54217782ebc4a 100644 --- a/app/code/Magento/CatalogInventory/Model/Configuration.php +++ b/app/code/Magento/CatalogInventory/Model/Configuration.php @@ -9,13 +9,14 @@ use Magento\CatalogInventory\Helper\Minsaleqty as MinsaleqtyHelper; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Catalog\Model\ProductTypes\ConfigInterface; +use Magento\Framework\ObjectManager\ResetAfterRequestInterface; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; /** * Class Configuration */ -class Configuration implements StockConfigurationInterface +class Configuration implements StockConfigurationInterface, ResetAfterRequestInterface { /** * Default website id @@ -122,7 +123,7 @@ class Configuration implements StockConfigurationInterface /** * All product types registry in scope of quantity availability * - * @var array + * @var array|null */ protected $isQtyTypeIds; @@ -151,6 +152,14 @@ public function __construct( $this->storeManager = $storeManager; } + /** + * @inheritDoc + */ + public function _resetState(): void + { + $this->isQtyTypeIds = null; + } + /** * @inheritdoc */ From 441ab882b12b194efe80a7913c9a8a3779814b49 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Fri, 26 May 2023 16:04:51 -0500 Subject: [PATCH 241/277] ACPT-1327 fixing typo in AbstractDb _resetState --- lib/internal/Magento/Framework/Data/Collection/AbstractDb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index 0c6b29f76e678..bf10332c15906 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -129,7 +129,7 @@ public function _resetState(): void $this->_idFieldName = null; $this->_bindParams = []; $this->_data = null; - $this->map = null; + $this->_map = null; $this->_fetchStmt = null; $this->_isOrdersRendered = false; $this->extensionAttributesJoinProcessor = null; From be0c9fa91a00291064639e6adf9a2c8a7ee29f98 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Tue, 30 May 2023 17:11:53 -0500 Subject: [PATCH 242/277] ACPT-1327 fixing static test failures --- .../ResourceModel/Selection/Collection.php | 2 -- .../Product/Compare/Item/Collection.php | 5 --- .../Model/Config/SortAttributeReader.php | 3 +- .../CatalogInventory/Model/Configuration.php | 34 +++++++++---------- .../ResourceModel/Fulltext/Collection.php | 9 ++--- .../Model/ResourceModel/Search/Collection.php | 8 ++--- app/code/Magento/Checkout/Model/Session.php | 6 ++-- .../Model/ResourceModel/Block/Collection.php | 4 --- .../Model/ResourceModel/Page/Collection.php | 4 --- .../Entity/Collection/AbstractCollection.php | 1 + .../ResourceModel/Attribute/Collection.php | 3 +- .../Model/ResourceModel/Queue/Collection.php | 2 -- .../ResourceModel/Subscriber/Collection.php | 3 +- .../Review/Product/Collection.php | 6 ---- .../Framework/Data/Collection/AbstractDb.php | 1 + .../Magento/Framework/HTTP/LaminasClient.php | 1 - 16 files changed, 32 insertions(+), 60 deletions(-) diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php index 96a40c7aea1b8..04f4305bdf77d 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection/Collection.php @@ -365,8 +365,6 @@ public function addPriceFilter($product, $searchMin, $useRegularPrice = false) * Get Catalog Rule Processor. * * @return \Magento\CatalogRule\Model\ResourceModel\Product\CollectionProcessor - * - * @deprecated 100.2.0 */ private function getCatalogRuleProcessor() { diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php index 2f6655069d00e..7100f20ecd96f 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php @@ -46,15 +46,11 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection protected $_comparableAttributes; /** - * Catalog product compare - * * @var \Magento\Catalog\Helper\Product\Compare */ protected $_catalogProductCompare = null; /** - * Catalog product compare item - * * @var \Magento\Catalog\Model\ResourceModel\Product\Compare\Item */ protected $_catalogProductCompareItem; @@ -299,7 +295,6 @@ public function getProductsByListId(int $listId): array return $this->getConnection()->fetchCol($select); } - /** * Set list_id for customer compare item * diff --git a/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php b/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php index 50b2b53bfb4a0..2f16e9ccb318f 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php +++ b/app/code/Magento/CatalogGraphQl/Model/Config/SortAttributeReader.php @@ -39,8 +39,9 @@ class SortAttributeReader implements ReaderInterface /** * @param MapperInterface $mapper - * @param AttributesCollection $attributesCollection + * @param AttributesCollection $attributesCollection @deprecated @see $attributesCollectionFactory * @param AttributesCollectionFactory|null $attributesCollectionFactory + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( MapperInterface $mapper, diff --git a/app/code/Magento/CatalogInventory/Model/Configuration.php b/app/code/Magento/CatalogInventory/Model/Configuration.php index 54217782ebc4a..c610a0350c9cc 100644 --- a/app/code/Magento/CatalogInventory/Model/Configuration.php +++ b/app/code/Magento/CatalogInventory/Model/Configuration.php @@ -21,87 +21,87 @@ class Configuration implements StockConfigurationInterface, ResetAfterRequestInt /** * Default website id */ - const DEFAULT_WEBSITE_ID = 1; + public const DEFAULT_WEBSITE_ID = 1; /** * Inventory options config path */ - const XML_PATH_GLOBAL = 'cataloginventory/options/'; + public const XML_PATH_GLOBAL = 'cataloginventory/options/'; /** * Subtract config path */ - const XML_PATH_CAN_SUBTRACT = 'cataloginventory/options/can_subtract'; + public const XML_PATH_CAN_SUBTRACT = 'cataloginventory/options/can_subtract'; /** * Back in stock config path */ - const XML_PATH_CAN_BACK_IN_STOCK = 'cataloginventory/options/can_back_in_stock'; + public const XML_PATH_CAN_BACK_IN_STOCK = 'cataloginventory/options/can_back_in_stock'; /** * Item options config path */ - const XML_PATH_ITEM = 'cataloginventory/item_options/'; + public const XML_PATH_ITEM = 'cataloginventory/item_options/'; /** * Max qty config path */ - const XML_PATH_MIN_QTY = 'cataloginventory/item_options/min_qty'; + public const XML_PATH_MIN_QTY = 'cataloginventory/item_options/min_qty'; /** * Min sale qty config path */ - const XML_PATH_MIN_SALE_QTY = 'cataloginventory/item_options/min_sale_qty'; + public const XML_PATH_MIN_SALE_QTY = 'cataloginventory/item_options/min_sale_qty'; /** * Max sale qty config path */ - const XML_PATH_MAX_SALE_QTY = 'cataloginventory/item_options/max_sale_qty'; + public const XML_PATH_MAX_SALE_QTY = 'cataloginventory/item_options/max_sale_qty'; /** * Back orders config path */ - const XML_PATH_BACKORDERS = 'cataloginventory/item_options/backorders'; + public const XML_PATH_BACKORDERS = 'cataloginventory/item_options/backorders'; /** * Notify stock config path */ - const XML_PATH_NOTIFY_STOCK_QTY = 'cataloginventory/item_options/notify_stock_qty'; + public const XML_PATH_NOTIFY_STOCK_QTY = 'cataloginventory/item_options/notify_stock_qty'; /** * Manage stock config path */ - const XML_PATH_MANAGE_STOCK = 'cataloginventory/item_options/manage_stock'; + public const XML_PATH_MANAGE_STOCK = 'cataloginventory/item_options/manage_stock'; /** * Enable qty increments config path */ - const XML_PATH_ENABLE_QTY_INCREMENTS = 'cataloginventory/item_options/enable_qty_increments'; + public const XML_PATH_ENABLE_QTY_INCREMENTS = 'cataloginventory/item_options/enable_qty_increments'; /** * Qty increments config path */ - const XML_PATH_QTY_INCREMENTS = 'cataloginventory/item_options/qty_increments'; + public const XML_PATH_QTY_INCREMENTS = 'cataloginventory/item_options/qty_increments'; /** * Show out of stock config path */ - const XML_PATH_SHOW_OUT_OF_STOCK = 'cataloginventory/options/show_out_of_stock'; + public const XML_PATH_SHOW_OUT_OF_STOCK = 'cataloginventory/options/show_out_of_stock'; /** * Auto return config path */ - const XML_PATH_ITEM_AUTO_RETURN = 'cataloginventory/item_options/auto_return'; + public const XML_PATH_ITEM_AUTO_RETURN = 'cataloginventory/item_options/auto_return'; /** * Path to configuration option 'Display product stock status' */ - const XML_PATH_DISPLAY_PRODUCT_STOCK_STATUS = 'cataloginventory/options/display_product_stock_status'; + public const XML_PATH_DISPLAY_PRODUCT_STOCK_STATUS = 'cataloginventory/options/display_product_stock_status'; /** * Threshold qty config path */ - const XML_PATH_STOCK_THRESHOLD_QTY = 'cataloginventory/options/stock_threshold_qty'; + public const XML_PATH_STOCK_THRESHOLD_QTY = 'cataloginventory/options/stock_threshold_qty'; /** * @var ConfigInterface diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php index c33db9060d834..28a47bbac9c17 100644 --- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php @@ -236,7 +236,6 @@ public function _resetState(): void /** * Get search. * - * @deprecated 100.1.0 * @return \Magento\Search\Api\SearchInterface */ private function getSearch() @@ -250,7 +249,7 @@ private function getSearch() /** * Test search. * - * @deprecated 100.1.0 + * @deprecated 100.1.0 @see __construct * @param \Magento\Search\Api\SearchInterface $object * @return void * @since 100.1.0 @@ -263,7 +262,6 @@ public function setSearch(\Magento\Search\Api\SearchInterface $object) /** * Set search criteria builder. * - * @deprecated 100.1.0 * @return \Magento\Framework\Api\Search\SearchCriteriaBuilder */ private function getSearchCriteriaBuilder() @@ -278,7 +276,7 @@ private function getSearchCriteriaBuilder() /** * Set search criteria builder. * - * @deprecated 100.1.0 + * @deprecated 100.1.0 @see __construct * @param \Magento\Framework\Api\Search\SearchCriteriaBuilder $object * @return void * @since 100.1.0 @@ -291,7 +289,6 @@ public function setSearchCriteriaBuilder(\Magento\Framework\Api\Search\SearchCri /** * Get filter builder. * - * @deprecated 100.1.0 * @return \Magento\Framework\Api\FilterBuilder */ private function getFilterBuilder() @@ -305,7 +302,7 @@ private function getFilterBuilder() /** * Set filter builder. * - * @deprecated 100.1.0 + * @deprecated 100.1.0 @see __construct * @param \Magento\Framework\Api\FilterBuilder $object * @return void * @since 100.1.0 diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php index 943ad76bcd6d2..10e72e0155ff3 100644 --- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php @@ -23,22 +23,16 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection private $indexUsageEnforcements; /** - * Attribute collection - * * @var array */ protected $_attributesCollection; /** - * Search query - * * @var string */ protected $_searchQuery; /** - * Attribute collection factory - * * @var \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory */ protected $_attributeCollectionFactory; @@ -250,6 +244,8 @@ private function isIndexExists(string $table, string $index) : bool * @param mixed $query * @param bool $searchOnlyInCurrentStore Search only in current store or in all stores * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function _getSearchEntityIdsSql($query, $searchOnlyInCurrentStore = true) { diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php index 6bf3819054749..3a2beb3b4371c 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -24,7 +24,7 @@ */ class Session extends \Magento\Framework\Session\SessionManager { - const CHECKOUT_STATE_BEGIN = 'begin'; + public const CHECKOUT_STATE_BEGIN = 'begin'; /** * Quote instance @@ -99,12 +99,12 @@ class Session extends \Magento\Framework\Session\SessionManager protected $customerRepository; /** - * @param QuoteIdMaskFactory + * @var QuoteIdMaskFactory */ protected $quoteIdMaskFactory; /** - * @param bool + * @var bool */ protected $isQuoteMasked; diff --git a/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php b/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php index 9e97bef526407..2d5a2e376eef3 100644 --- a/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php +++ b/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php @@ -19,15 +19,11 @@ class Collection extends AbstractCollection protected $_idFieldName = 'block_id'; /** - * Event prefix - * * @var string */ protected $_eventPrefix = 'cms_block_collection'; /** - * Event object - * * @var string */ protected $_eventObject = 'block_collection'; diff --git a/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php b/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php index b7b4bf2db144d..4c3e9be664409 100644 --- a/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php +++ b/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php @@ -26,15 +26,11 @@ class Collection extends AbstractCollection protected $_previewFlag; /** - * Event prefix - * * @var string */ protected $_eventPrefix = 'cms_page_collection'; /** - * Event object - * * @var string */ protected $_eventObject = 'page_collection'; diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index 2b2f7d991a098..1bc2ca7f63dfa 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -19,6 +19,7 @@ * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) * @since 100.0.2 */ abstract class AbstractCollection extends AbstractDb implements SourceProviderInterface diff --git a/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php index 5a60ecc8600d1..7a1f4fe4cfcea 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php @@ -18,7 +18,7 @@ abstract class Collection extends \Magento\Eav\Model\ResourceModel\Entity\Attrib /** * code of password hash in customer's EAV tables */ - const EAV_CODE_PASSWORD_HASH = 'password_hash'; + public const EAV_CODE_PASSWORD_HASH = 'password_hash'; /** * Current website scope instance @@ -221,6 +221,7 @@ protected function _initSelect() /** * Specify attribute entity type filter. + * * Entity type is defined. * * @param int $type diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php index e7b5c9d0ee365..00c9d1736d857 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php @@ -30,8 +30,6 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab protected $_isStoreFilter = false; /** - * Date - * * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php index a83b05c19e6c0..224ee66f63af3 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php @@ -82,8 +82,7 @@ public function __construct( } /** - * Constructor - * Configures collection + * Constructor configures collection * * @return void */ diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php index f463f7a639629..900cdc1f330d4 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php @@ -21,22 +21,16 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection { /** - * Entities alias - * * @var array */ protected $_entitiesAlias = []; /** - * Review store table - * * @var string */ protected $_reviewStoreTable; /** - * Add store data flag - * * @var bool */ protected $_addStoreDataFlag = false; diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index bf10332c15906..f4c8df8c856e8 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -19,6 +19,7 @@ * phpcs:disable Magento2.Classes.AbstractApi * @api * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @since 100.0.2 */ abstract class AbstractDb extends \Magento\Framework\Data\Collection diff --git a/lib/internal/Magento/Framework/HTTP/LaminasClient.php b/lib/internal/Magento/Framework/HTTP/LaminasClient.php index b90bc725b3fab..082b0b1ceb89b 100644 --- a/lib/internal/Magento/Framework/HTTP/LaminasClient.php +++ b/lib/internal/Magento/Framework/HTTP/LaminasClient.php @@ -46,7 +46,6 @@ public function _resetState(): void $this->reset(); } - /** * Change value of internal flag to disable/enable custom prepare functionality * From d3eec3e46e91784ec57ce54e6460c16f77d316d4 Mon Sep 17 00:00:00 2001 From: Andrii Kasian <akasian@adobe.com> Date: Tue, 30 May 2023 18:16:22 -0500 Subject: [PATCH 243/277] Store Url fixes --- .../GraphQl/Store/AvailableStoresTest.php | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php index b722762cf8a06..b2aa977bbb59f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php @@ -48,24 +48,13 @@ protected function setUp(): void /** * @magentoConfigFixture default_store web/seo/use_rewrites 1 - * @magentoApiDataFixture Magento/Store/_files/store.php - * @magentoApiDataFixture Magento/Store/_files/inactive_store.php + * @magentoConfigFixture default_store web/unsecure/base_url http://example.com/ + * @magentoConfigFixture default_store web/unsecure/base_link_url http://example.com/ + * @magentoApiDataFixture Magento/Store/_files/second_website_with_two_stores.php */ - public function testDefaultWebsiteAvailableStoreConfigs(): void + public function testNonDefaultWebsiteAvailableStoreConfigs(): void { - $storeConfigs = $this->storeConfigManager->getStoreConfigs(); - - $expectedAvailableStores = []; - $expectedAvailableStoreCodes = [ - 'default', - 'test' - ]; - - foreach ($storeConfigs as $storeConfig) { - if (in_array($storeConfig->getCode(), $expectedAvailableStoreCodes)) { - $expectedAvailableStores[] = $storeConfig; - } - } + $storeConfigs = $this->storeConfigManager->getStoreConfigs(['fixture_second_store', 'fixture_third_store']); $query = <<<QUERY @@ -101,21 +90,37 @@ public function testDefaultWebsiteAvailableStoreConfigs(): void } } QUERY; - $response = $this->graphQlQuery($query); + $headerMap = ['Store' => 'fixture_second_store']; + $response = $this->graphQlQuery($query, [], '', $headerMap); $this->assertArrayHasKey('availableStores', $response); - foreach ($expectedAvailableStores as $key => $storeConfig) { + foreach ($storeConfigs as $key => $storeConfig) { $this->validateStoreConfig($storeConfig, $response['availableStores'][$key]); } } /** * @magentoConfigFixture default_store web/seo/use_rewrites 1 - * @magentoApiDataFixture Magento/Store/_files/second_website_with_two_stores.php + * @magentoConfigFixture default_store web/unsecure/base_url http://example.com/ + * @magentoConfigFixture default_store web/unsecure/base_link_url http://example.com/ + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoApiDataFixture Magento/Store/_files/inactive_store.php */ - public function testNonDefaultWebsiteAvailableStoreConfigs(): void + public function testDefaultWebsiteAvailableStoreConfigs(): void { - $storeConfigs = $this->storeConfigManager->getStoreConfigs(['fixture_second_store', 'fixture_third_store']); + $storeConfigs = $this->storeConfigManager->getStoreConfigs(); + + $expectedAvailableStores = []; + $expectedAvailableStoreCodes = [ + 'default', + 'test' + ]; + + foreach ($storeConfigs as $storeConfig) { + if (in_array($storeConfig->getCode(), $expectedAvailableStoreCodes)) { + $expectedAvailableStores[] = $storeConfig; + } + } $query = <<<QUERY @@ -151,11 +156,10 @@ public function testNonDefaultWebsiteAvailableStoreConfigs(): void } } QUERY; - $headerMap = ['Store' => 'fixture_second_store']; - $response = $this->graphQlQuery($query, [], '', $headerMap); + $response = $this->graphQlQuery($query); $this->assertArrayHasKey('availableStores', $response); - foreach ($storeConfigs as $key => $storeConfig) { + foreach ($expectedAvailableStores as $key => $storeConfig) { $this->validateStoreConfig($storeConfig, $response['availableStores'][$key]); } } @@ -209,6 +213,8 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r /** * @magentoConfigFixture default_store web/seo/use_rewrites 1 + * @magentoConfigFixture default_store web/unsecure/base_url http://example.com/ + * @magentoConfigFixture default_store web/unsecure/base_link_url http://example.com/ * @magentoApiDataFixture Magento/Store/_files/second_website_with_four_stores_divided_in_groups.php * @magentoConfigFixture web/url/use_store 1 */ @@ -270,6 +276,8 @@ public function testAllStoreConfigsWithCodeInUrlEnabled(): void /** * @magentoConfigFixture default_store web/seo/use_rewrites 1 + * @magentoConfigFixture default_store web/unsecure/base_url http://example.com/ + * @magentoConfigFixture default_store web/unsecure/base_link_url http://example.com/ * @magentoApiDataFixture Magento/Store/_files/second_website_with_four_stores_divided_in_groups.php */ public function testCurrentGroupStoreConfigs(): void From 9c86b96e00e78cd9d832ce53f9da537c514b061e Mon Sep 17 00:00:00 2001 From: Shanthi <103998768+glo25731@users.noreply.github.com> Date: Wed, 31 May 2023 14:00:20 +0530 Subject: [PATCH 244/277] Delete : --- : | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 : diff --git a/: b/: deleted file mode 100644 index 4810bd3e977ba..0000000000000 --- a/: +++ /dev/null @@ -1,6 +0,0 @@ -Merge branch 'ACQE-4652_1' into bengals-mainline-deployment -# Please enter a commit message to explain why this merge is necessary, -# especially if it merges an updated upstream into a topic branch. -# -# Lines starting with '#' will be ignored, and an empty message aborts -# the commit. From 1ff58275a13d3ca205b4824b8ded7e66f0f3910b Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Wed, 31 May 2023 17:26:27 +0530 Subject: [PATCH 245/277] AC-8841:: Data transfer -> Import Settings -> The link to download sample file is not working properly --- .../ImportExport/Controller/Adminhtml/Import/Download.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php index ebf88e6c68e23..2b783ef4d58f4 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php @@ -115,7 +115,8 @@ public function execute() ); $resultRaw = $this->resultRawFactory->create(); - $resultRaw->setContents($fileContents); + $resultRaw->setContents($fileContents) + ->setHeader('Content-Disposition', 'attachment; filename=' . $fileName); return $resultRaw; } From 9a23f2d13d59f773c7724a036c0f9005b6be4145 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Wed, 31 May 2023 16:05:04 -0500 Subject: [PATCH 246/277] ACP2E-2015: Customizable Option Image link is broken --- .../Controller/Download/DownloadCustomOption.php | 4 +++- app/code/Magento/Sales/Model/Download.php | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php index a2aaed18cb56e..15d853cabfbee 100644 --- a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php +++ b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php @@ -29,6 +29,8 @@ class DownloadCustomOption extends \Magento\Framework\App\Action\Action implemen /** * @var \Magento\Framework\Unserialize\Unserialize * @deprecated 101.0.0 + * @deprecated No longer used + * @see $serializer */ protected $unserialize; @@ -106,7 +108,7 @@ public function execute() if ($this->getRequest()->getParam('key') != $info['secret_key']) { return $resultForward->forward('noroute'); } - $this->download->downloadFile($info); + return $this->download->createResponse($info); } catch (\Exception $e) { return $resultForward->forward('noroute'); } diff --git a/app/code/Magento/Sales/Model/Download.php b/app/code/Magento/Sales/Model/Download.php index e4a0a0ba93e7b..8f7b991f3ce4c 100644 --- a/app/code/Magento/Sales/Model/Download.php +++ b/app/code/Magento/Sales/Model/Download.php @@ -67,8 +67,22 @@ public function __construct( * @param array $info * @return void * @throws \Exception + * @deprecated No longer recommended + * @see createResponse() */ public function downloadFile($info) + { + $this->createResponse($info); + } + + /** + * Returns a file response + * + * @param array $info + * @return \Magento\Framework\App\ResponseInterface + * @throws \Exception + */ + public function createResponse($info) { $relativePath = $info['order_path']; if (!$this->_isCanProcessed($relativePath)) { @@ -80,7 +94,7 @@ public function downloadFile($info) ); } } - $this->_fileFactory->create( + return $this->_fileFactory->create( $info['title'], ['value' => $this->_rootDir->getRelativePath($relativePath), 'type' => 'filename'], $this->rootDirBasePath, From fbfe0a917214623983ae66291c0733e2b3a712f7 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Wed, 31 May 2023 16:57:50 -0500 Subject: [PATCH 247/277] ACP2E-2015: Customizable Option Image link is broken --- .../Backup/Controller/Adminhtml/Index/Download.php | 12 ++++-------- .../Controller/Adminhtml/History/Download.php | 10 +++------- .../Controller/Index/DownloadCustomOption.php | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php index 864e5f4b37721..dbdd0679c69aa 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php @@ -6,9 +6,10 @@ */ namespace Magento\Backup\Controller\Adminhtml\Index; +use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Filesystem\DirectoryList; -class Download extends \Magento\Backup\Controller\Adminhtml\Index +class Download extends \Magento\Backup\Controller\Adminhtml\Index implements HttpGetActionInterface { /** * @var \Magento\Framework\Controller\Result\RawFactory @@ -66,17 +67,12 @@ public function execute() $fileName = $this->_objectManager->get(\Magento\Backup\Helper\Data::class)->generateBackupDownloadName($backup); - $this->_fileFactory->create( + return $this->_fileFactory->create( $fileName, - null, + $backup->output(), DirectoryList::VAR_DIR, 'application/octet-stream', $backup->getSize() ); - - /** @var \Magento\Framework\Controller\Result\Raw $resultRaw */ - $resultRaw = $this->resultRawFactory->create(); - $resultRaw->setContents($backup->output()); - return $resultRaw; } } diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php b/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php index 9dcb2fdafb74f..c207b56be17aa 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php @@ -47,6 +47,7 @@ public function __construct( */ public function execute() { + // phpcs:ignore Magento2.Functions.DiscouragedFunction $fileName = basename($this->getRequest()->getParam('filename')); /** @var \Magento\ImportExport\Helper\Report $reportHelper */ @@ -59,17 +60,12 @@ public function execute() return $resultRedirect; } - $this->fileFactory->create( + return $this->fileFactory->create( $fileName, - null, + $reportHelper->getReportOutput($fileName), DirectoryList::VAR_IMPORT_EXPORT, 'application/octet-stream', $reportHelper->getReportSize($fileName) ); - - /** @var \Magento\Framework\Controller\Result\Raw $resultRaw */ - $resultRaw = $this->resultRawFactory->create(); - $resultRaw->setContents($reportHelper->getReportOutput($fileName)); - return $resultRaw; } } diff --git a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php index 3a2d9061e7f36..f194bab868ec9 100644 --- a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php +++ b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php @@ -97,7 +97,7 @@ public function execute() $secretKey = $this->getRequest()->getParam('key'); if ($secretKey == $info['secret_key']) { - $this->_fileResponseFactory->create( + return $this->_fileResponseFactory->create( $info['title'], ['value' => $info['quote_path'], 'type' => 'filename'], DirectoryList::MEDIA, From 74de8fd35eaa697ded4cb4c4a7b47ab63c4ce217 Mon Sep 17 00:00:00 2001 From: Nishant Rana <glo04412@adobe.com> Date: Thu, 1 Jun 2023 12:42:47 +0530 Subject: [PATCH 248/277] Revert "Updating composer versions for version-setter for 2.4.6" This reverts commit 7fb0ec423882b4ea880aa070d1b4298f991633fd. --- app/code/Magento/AdminAnalytics/composer.json | 24 +++---- .../Magento/AdminNotification/composer.json | 24 +++---- .../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 | 32 ++++----- .../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 | 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/OpenSearch/composer.json | 22 +++--- 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 ++- 223 files changed, 2413 insertions(+), 2851 deletions(-) diff --git a/app/code/Magento/AdminAnalytics/composer.json b/app/code/Magento/AdminAnalytics/composer.json index 72407e4f4c119..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.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-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 a3f2d07f63b65..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.5", "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/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index c52092b56c3d7..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.6", "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 222f9c3da97cf..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.4", "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 61263c423890e..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.3", "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 8ee1b7d91960a..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.6", - "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 d14d785f22d44..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.6", "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 3b3596bfa1ba8..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.6", "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 d97c11964c946..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.4", "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 3ce10ba96ff3d..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.6", "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 c1f6610fe9852..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.6", "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 7e99f30969451..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.6", "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 22720d7f795aa..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.6", - "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 7a4855c5749f3..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.5", "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 eba6b087ca446..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.4", "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 5d9e4d28c489d..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.6", "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 d1c56d6e8bd10..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.4", "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 4b0cd01d6bc26..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.6", "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 a1f7f80748319..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.3", - "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 7168091a40cfd..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.2", "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 d99751e54e243..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.5", - "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 8531b676b24ff..f51d069ec0684 100644 --- a/app/code/Magento/CatalogGraphQl/composer.json +++ b/app/code/Magento/CatalogGraphQl/composer.json @@ -2,30 +2,29 @@ "name": "magento/module-catalog-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.6", "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-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-config": "*", - "magento/module-advanced-search": "100.4.*" + "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" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index 70dfae04fc488..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.6", "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 8f7416de33e89..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.6", "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 4c45fd6319edf..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.3", - "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 bbb58e9cca811..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.6", "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 02fa1e01e9831..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.5", "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 d6af5d0916f72..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.3", "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 cb1a3c3c13928..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.6", "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 fdf8b4df854c3..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.6", "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 3879b426cc935..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.4", "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 9c51b4f00d30e..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.6", "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 b0356991fd9a0..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.6", "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 d98b307b84b84..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.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-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 9ece75204f615..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.2", "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 3ecd43c3163a3..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.6", "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 4786af8a02866..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.3", "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 fa24885c1525b..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.5", "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 c949f41846a07..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.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-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 2b56700b83293..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.2", - "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 603162f317bb3..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.6", "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 31f941a4b1ce2..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.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-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 2b773ff0b5309..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.6", "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 ab16ff4fc8e65..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.6", - "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 50cbe3edf6696..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.3", "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 1d5dbc3ede6a2..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.5", "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 85ec34011ac33..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.6", "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 bd3a43dcb04b2..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.6", "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 0cce60de63026..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.5", "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 638b26ea8ef91..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.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-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 726be45cd66e9..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.6", "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 802a1fa00ebd1..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.3", - "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 219a8b479ac92..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.2", "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 1fda2fbc320f5..bbd5e17036dc8 100644 --- a/app/code/Magento/CustomerGraphQl/composer.json +++ b/app/code/Magento/CustomerGraphQl/composer.json @@ -2,26 +2,25 @@ "name": "magento/module-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.6", "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-authorization": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", "magento/module-eav-graph-ql": "*", - "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.*" + "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" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index d08647f46ea02..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.6", "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 68f2aa0acce2e..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.6", "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 06333f6a17873..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.6", "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 3a07467a8823b..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.5", "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 8aba070e1ca81..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.6", "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 bc7d04030135e..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.4", - "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 a0094c60698a9..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.6", "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 6875fa9572c27..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.6", "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 1d9d0935cb3ef..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.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-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 a65b0a0ea5ca5..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.6", "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 5e187295d726b..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.3", "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 bb4a095808871..714890fd5f452 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.6", "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 || ~8.5.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 3c793b31575d6..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.6", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-elasticsearch": "101.0.*", + "magento/framework": "*", + "magento/module-elasticsearch": "*", "elasticsearch/elasticsearch": "^7.17", - "magento/module-advanced-search": "100.4.*", - "magento/module-catalog-search": "102.0.*", - "magento/module-search": "101.1.*" + "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 +27,3 @@ } } } - diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index 347f91b155c68..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.6", "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 8cfa6778ae68f..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.4", "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 2e5ecec26ab10..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.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/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index 07aca6fb886b3..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.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-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 fd0a85478e9bc..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.4", "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 b9774878989a7..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.3", "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 f36a7de32d535..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.2", "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 d4213065f39f6..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.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/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index eaad1a005eaa3..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.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-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 2e02286e3af94..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.6", "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.*", + "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 34db5ffafcfb2..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.3", - "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 9ded78d413e21..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.3", "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 f6b1613b79a70..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.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-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 90c014b878640..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.6", "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 c506dff0dc317..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.6", - "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 81f0ad7fca8ed..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.6", "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 52d9a5591a41b..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.6", "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 d78743c07689d..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.5", "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 907ad94b4bd91..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.6", "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 dcbdc89cfb718..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.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", + "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 25fe8834cd471..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.1", "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 daec6732a0664..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.6", "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 2b2eb25250d41..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.6", "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 77602ffdedc2c..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.6", + "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 63253d6b4bded..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.5", - "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 16ed3e854c6bf..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.5", + "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 95517fd0a48c9..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.5", - "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 6e08392b27273..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.3", "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 370a4d90c51d8..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.4", + "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 010b5c8624eae..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.5", + "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 e2008d68abf76..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.4", + "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 612142f813453..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.5", + "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 dbcf651910aa9..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.4", "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 4a78525082875..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.4", - "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 0ef247d0ccd37..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.5", - "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 2c352d9987c5b..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.4", - "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 2071dc0c3868b..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.4", - "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 0532ddaddfaa2..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.5", "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 84a80b90a6e25..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.4", - "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 444dcd3a95e9f..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.3", - "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 0f68ec4a4a02b..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.3", - "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 2019f89a6d43d..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.5", - "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 3d20fc5770ab5..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.5", - "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 d1d90aa5db83a..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.3", - "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 532ca881b2efe..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.3", "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 4c4619171cc3a..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.3", - "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 9ab26ba78468e..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.3", - "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 781da96b1cf94..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.5", "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 f41f7c39d9629..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.4", - "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 d7f33e6ec76f4..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.3", - "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 4709b2c8b0729..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.4", "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 990171e9696e1..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.3", - "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 0f7598adde956..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.5", - "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 c746823cc40fa..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.4", - "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 466080c2fb1dd..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.2", - "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 6911017121adb..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.5", - "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 e6b0795d5b066..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.4", "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 14e38db53967d..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.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-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 55745d6d28450..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.6", "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 5a50521cb99b3..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.5", "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 548f9c97db545..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.3", "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 2926d4333b409..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.3", "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 b301b3721a8f9..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.6", "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 f417cd6a2159a..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.4", "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 5dd88e8932c2a..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.4", "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 8ab27ae53880f..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.6", "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 aa6f167e0d730..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.3", + "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 b21419adb01e7..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.4", "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 55e6cead59ad9..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.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-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/OpenSearch/composer.json b/app/code/Magento/OpenSearch/composer.json index 5ebdea5086f99..1b9e006b9e9b1 100644 --- a/app/code/Magento/OpenSearch/composer.json +++ b/app/code/Magento/OpenSearch/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-open-search", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-advanced-search": "*", + "magento/module-catalog-search": "*", + "magento/module-elasticsearch": "*", + "magento/module-search": "*", + "magento/module-config": "*", + "opensearch-project/opensearch-php": "^1.0 || ^2.0" + }, "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-advanced-search": "100.4.*", - "magento/module-catalog-search": "102.0.*", - "magento/module-elasticsearch": "101.0.*", - "magento/module-search": "101.1.*", - "magento/module-config": "101.2.*", - "opensearch-project/opensearch-php": "^1.0 || ^2.0" - }, "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index 4b00d23104b5d..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.6", "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 5d24680b7312f..7d986543ef60f 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-payment", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.6", "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": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/PaymentGraphQl/composer.json b/app/code/Magento/PaymentGraphQl/composer.json index 0315acfc5c734..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.1", "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 3882394b32435..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.6", "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 f661efcb75bd1..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.3", "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 0104492e2742b..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.4", "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 f4a4a48eb0107..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.6", "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 5ae5834286fc8..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.5", "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 2476d5beeb45c..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.6", "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 507b1e7d64b5b..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.6", "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 6f9a31399dd9e..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.5", - "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 6beb274f8883c..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.2", - "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 f5e853208c6e6..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.2", - "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 2224d2b663370..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.2", - "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 c067c235d7f92..62c37801cbcbb 100644 --- a/app/code/Magento/QuoteGraphQl/composer.json +++ b/app/code/Magento/QuoteGraphQl/composer.json @@ -2,32 +2,31 @@ "name": "magento/module-quote-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.6", "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": "*", "magento/module-eav-graph-ql": "*" }, "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" @@ -37,4 +36,3 @@ } } } - diff --git a/app/code/Magento/RelatedProductGraphQl/composer.json b/app/code/Magento/RelatedProductGraphQl/composer.json index bce199f696105..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.3", "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 a60f5f94535f0..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.4", "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 2310aa5ce3d32..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.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", + "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 1d0a0ca59470d..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.6", "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 ca3ae524cd9d0..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.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/Review/composer.json b/app/code/Magento/Review/composer.json index 110b3a0509be5..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.6", "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 559ee484e68a3..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.3", - "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 cf74e40853a6a..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.2", "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 eddc3169d79f5..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.2", "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 20305590b5a32..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.4", "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 6983fcca47d76..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.5", "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 08bdee5cd5268..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.6", "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 de43645eb649d..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.3", - "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 11a25c9d67a66..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.6", - "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 c5cd0f756f26f..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.3", "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 e816fda085c9b..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.6", "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 1e61a432fa3d0..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.3", "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 66529ba4f1139..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.4", "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 0938f0653e1de..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.6", "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 80347cfaaec8d..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.6", "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 fa1943b15df51..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.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-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 51a6bb18e73af..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.2", - "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 168a401db3ce5..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.6", "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 1eb477d18b991..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.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-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 f9504158c6ff5..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.6", "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 7407ac0d5ce1e..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.4", - "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 bd65f6fdc1cb7..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.5", "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 d5f79df9c7356..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.2", "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 eeee8bbd4560b..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.2", "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 6274be644d726..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.6", "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 04f891ccf2805..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.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-swatches": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*" + "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 caa4a3ec723e6..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.2", "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 62ef30507b0f3..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.6", "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 ed7fd41912bb3..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.2", "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 216ee652d7a44..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.5", "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 cd8eee7101453..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.6", "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 83579945c7993..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.3", "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 eefc79cab6449..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.6", "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 09ca895acd3a5..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.6", "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 6292a52d88b30..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.6", "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 9d45e1aad05d2..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.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-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 8487448711b77..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.5", "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 46e20d0ca80f2..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.6", "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 a25b0b54fa1f8..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.5", "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 20b3aaf5fafbe..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.4", "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 1b119f82795e5..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.6", "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 597f8c34b1022..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.2", - "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 d7306eee34237..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.3", "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 8f4e9faff6bcf..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.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-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 9a029ab0ead9d..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.4", "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 9c7eb79d5ad09..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.3", "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 91665633d491d..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.6", "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 c60000c8b68ba..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.3", "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 8427390aee5cb..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.6", "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 94142e9f30389..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.6", "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 be58362c32039..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.4", - "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 f0bd5758c3045..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.6", - "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 badcf6e8490e3..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.6", "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 4f1e04c72d152..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.6", "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 e344b2309e683..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.6", "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/lib/internal/Magento/Framework/Amqp/composer.json b/lib/internal/Magento/Framework/Amqp/composer.json index c57e65f34e2ea..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.4", "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 9cc399090ec91..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.2", "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 8588e4ed2ec04..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.6", "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 7f1ec96fd024b..488f553682957 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.6", "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 ec8a568a83b20d036fd31b455e3a6f7c58689483 Mon Sep 17 00:00:00 2001 From: Nishant Rana <glo04412@adobe.com> Date: Thu, 1 Jun 2023 12:44:28 +0530 Subject: [PATCH 249/277] Revert "Updating root composer files for publication service for 2.4.6" This reverts commit d846142a3ab8b49597dfb8bd7508d875efdab19a. --- composer.json | 528 +++++++++++++++++++++++++------------------------- 1 file changed, 263 insertions(+), 265 deletions(-) diff --git a/composer.json b/composer.json index ea280e0dc5569..de82ab814e132 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,6 @@ "preferred-install": "dist", "sort-packages": true }, - "version": "2.4.6", "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -92,30 +91,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", @@ -131,269 +106,292 @@ "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.4", - "magento/module-admin-analytics": "100.4.5", - "magento/module-admin-notification": "100.4.5", - "magento/module-advanced-pricing-import-export": "100.4.6", - "magento/module-amqp": "100.4.3", - "magento/module-analytics": "100.4.6", - "magento/module-asynchronous-operations": "100.4.6", - "magento/module-authorization": "100.4.6", - "magento/module-advanced-search": "100.4.4", - "magento/module-backend": "102.0.6", - "magento/module-backup": "100.4.6", - "magento/module-bundle": "101.0.6", - "magento/module-bundle-graph-ql": "100.4.6", - "magento/module-bundle-import-export": "100.4.5", - "magento/module-cache-invalidate": "100.4.4", - "magento/module-captcha": "100.4.6", - "magento/module-cardinal-commerce": "100.4.4", - "magento/module-catalog": "104.0.6", - "magento/module-catalog-customer-graph-ql": "100.4.5", - "magento/module-catalog-analytics": "100.4.3", - "magento/module-catalog-import-export": "101.1.6", - "magento/module-catalog-inventory": "100.4.6", - "magento/module-catalog-inventory-graph-ql": "100.4.3", - "magento/module-catalog-rule": "101.2.6", - "magento/module-catalog-rule-graph-ql": "100.4.3", - "magento/module-catalog-rule-configurable": "100.4.5", - "magento/module-catalog-search": "102.0.6", - "magento/module-catalog-url-rewrite": "100.4.6", - "magento/module-catalog-widget": "100.4.6", - "magento/module-checkout": "100.4.6", - "magento/module-checkout-agreements": "100.4.5", - "magento/module-checkout-agreements-graph-ql": "100.4.2", - "magento/module-cms": "104.0.6", - "magento/module-cms-url-rewrite": "100.4.5", - "magento/module-compare-list-graph-ql": "100.4.2", - "magento/module-config": "101.2.6", + "magento/module-marketplace": "*", + "magento/module-admin-analytics": "*", + "magento/module-admin-notification": "*", + "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-async-config": "*", - "magento/module-configurable-import-export": "100.4.4", - "magento/module-configurable-product": "100.4.6", - "magento/module-configurable-product-sales": "100.4.3", - "magento/module-contact": "100.4.5", + "magento/module-configurable-import-export": "*", + "magento/module-configurable-product": "*", + "magento/module-configurable-product-sales": "*", + "magento/module-contact": "*", "magento/module-contact-graph-ql": "*", - "magento/module-cookie": "100.4.6", - "magento/module-cron": "100.4.6", - "magento/module-currency-symbol": "100.4.4", - "magento/module-customer": "103.0.6", - "magento/module-customer-analytics": "100.4.3", - "magento/module-customer-downloadable-graph-ql": "100.4.2", - "magento/module-customer-import-export": "100.4.6", - "magento/module-deploy": "100.4.6", - "magento/module-developer": "100.4.6", - "magento/module-dhl": "100.4.5", - "magento/module-directory": "100.4.6", - "magento/module-directory-graph-ql": "100.4.4", - "magento/module-downloadable": "100.4.6", - "magento/module-downloadable-graph-ql": "100.4.6", - "magento/module-downloadable-import-export": "100.4.5", - "magento/module-eav": "102.1.6", - "magento/module-open-search": "100.4.0", - "magento/module-elasticsearch": "101.0.6", - "magento/module-elasticsearch-7": "100.4.6", - "magento/module-email": "101.1.6", - "magento/module-encryption-key": "100.4.4", - "magento/module-fedex": "100.4.4", - "magento/module-gift-message": "100.4.5", - "magento/module-gift-message-graph-ql": "100.4.4", - "magento/module-google-adwords": "100.4.3", - "magento/module-google-analytics": "100.4.2", - "magento/module-google-optimizer": "100.4.5", - "magento/module-google-gtag": "100.4.1", - "magento/module-graph-ql": "100.4.6", - "magento/module-graph-ql-cache": "100.4.3", - "magento/module-catalog-graph-ql": "100.4.6", - "magento/module-catalog-cms-graph-ql": "100.4.2", - "magento/module-catalog-url-rewrite-graph-ql": "100.4.4", - "magento/module-configurable-product-graph-ql": "100.4.6", - "magento/module-customer-graph-ql": "100.4.6", - "magento/module-eav-graph-ql": "100.4.3", - "magento/module-swatches-graph-ql": "100.4.4", - "magento/module-tax-graph-ql": "100.4.2", - "magento/module-url-rewrite-graph-ql": "100.4.5", - "magento/module-cms-url-rewrite-graph-ql": "100.4.4", - "magento/module-weee-graph-ql": "100.4.3", - "magento/module-cms-graph-ql": "100.4.3", - "magento/module-grouped-import-export": "100.4.4", - "magento/module-grouped-product": "100.4.6", - "magento/module-grouped-catalog-inventory": "100.4.3", - "magento/module-grouped-product-graph-ql": "100.4.6", - "magento/module-import-export": "101.0.6", - "magento/module-indexer": "100.4.6", - "magento/module-instant-purchase": "100.4.5", - "magento/module-integration": "100.4.6", - "magento/module-layered-navigation": "100.4.6", - "magento/module-login-as-customer": "100.4.6", - "magento/module-login-as-customer-admin-ui": "100.4.6", - "magento/module-login-as-customer-api": "100.4.5", - "magento/module-login-as-customer-assistance": "100.4.5", - "magento/module-login-as-customer-frontend-ui": "100.4.5", - "magento/module-login-as-customer-graph-ql": "100.4.3", - "magento/module-login-as-customer-log": "100.4.4", - "magento/module-login-as-customer-quote": "100.4.4", - "magento/module-login-as-customer-page-cache": "100.4.5", - "magento/module-login-as-customer-sales": "100.4.5", - "magento/module-media-content": "100.4.4", - "magento/module-media-content-api": "100.4.5", - "magento/module-media-content-catalog": "100.4.4", - "magento/module-media-content-cms": "100.4.4", - "magento/module-media-gallery": "100.4.5", - "magento/module-media-gallery-api": "101.0.5", - "magento/module-media-gallery-ui": "100.4.5", - "magento/module-media-gallery-ui-api": "100.4.4", - "magento/module-media-gallery-integration": "100.4.5", - "magento/module-media-gallery-synchronization": "100.4.5", - "magento/module-media-gallery-synchronization-api": "100.4.4", - "magento/module-media-content-synchronization": "100.4.5", - "magento/module-media-content-synchronization-api": "100.4.4", - "magento/module-media-content-synchronization-catalog": "100.4.3", - "magento/module-media-content-synchronization-cms": "100.4.3", - "magento/module-media-gallery-synchronization-metadata": "100.4.2", - "magento/module-media-gallery-metadata": "100.4.4", - "magento/module-media-gallery-metadata-api": "100.4.3", - "magento/module-media-gallery-catalog-ui": "100.4.3", - "magento/module-media-gallery-cms-ui": "100.4.3", - "magento/module-media-gallery-catalog-integration": "100.4.3", - "magento/module-media-gallery-catalog": "100.4.3", - "magento/module-media-gallery-renditions": "100.4.4", - "magento/module-media-gallery-renditions-api": "100.4.3", - "magento/module-media-storage": "100.4.5", - "magento/module-message-queue": "100.4.6", - "magento/module-msrp": "100.4.5", - "magento/module-msrp-configurable-product": "100.4.3", - "magento/module-msrp-grouped-product": "100.4.3", - "magento/module-multishipping": "100.4.6", - "magento/module-mysql-mq": "100.4.4", - "magento/module-new-relic-reporting": "100.4.4", - "magento/module-newsletter": "100.4.6", - "magento/module-newsletter-graph-ql": "100.4.3", - "magento/module-offline-payments": "100.4.4", - "magento/module-offline-shipping": "100.4.5", - "magento/module-page-cache": "100.4.6", - "magento/module-payment": "100.4.6", - "magento/module-payment-graph-ql": "100.4.1", - "magento/module-paypal": "101.0.6", - "magento/module-paypal-captcha": "100.4.3", - "magento/module-paypal-graph-ql": "100.4.4", - "magento/module-persistent": "100.4.6", - "magento/module-product-alert": "100.4.5", - "magento/module-product-video": "100.4.6", - "magento/module-quote": "101.2.6", - "magento/module-quote-analytics": "100.4.5", - "magento/module-quote-bundle-options": "100.4.2", - "magento/module-quote-configurable-options": "100.4.2", - "magento/module-quote-downloadable-links": "100.4.2", - "magento/module-quote-graph-ql": "100.4.6", - "magento/module-related-product-graph-ql": "100.4.3", - "magento/module-release-notification": "100.4.4", - "magento/module-reports": "100.4.6", - "magento/module-require-js": "100.4.2", - "magento/module-review": "100.4.6", - "magento/module-review-graph-ql": "100.4.2", - "magento/module-review-analytics": "100.4.3", - "magento/module-robots": "101.1.2", - "magento/module-rss": "100.4.4", - "magento/module-rule": "100.4.5", - "magento/module-sales": "103.0.6", - "magento/module-sales-analytics": "100.4.3", - "magento/module-sales-graph-ql": "100.4.6", - "magento/module-sales-inventory": "100.4.3", - "magento/module-sales-rule": "101.2.6", - "magento/module-sales-sequence": "100.4.3", - "magento/module-sample-data": "100.4.4", - "magento/module-search": "101.1.6", - "magento/module-security": "100.4.6", - "magento/module-send-friend": "100.4.4", - "magento/module-send-friend-graph-ql": "100.4.2", - "magento/module-shipping": "100.4.6", - "magento/module-sitemap": "100.4.5", - "magento/module-store": "101.1.6", - "magento/module-store-graph-ql": "100.4.4", - "magento/module-swagger": "100.4.5", - "magento/module-swagger-webapi": "100.4.2", - "magento/module-swagger-webapi-async": "100.4.2", - "magento/module-swatches": "100.4.6", - "magento/module-swatches-layered-navigation": "100.4.2", - "magento/module-tax": "100.4.6", - "magento/module-tax-import-export": "100.4.5", - "magento/module-theme": "101.1.6", - "magento/module-theme-graph-ql": "100.4.3", - "magento/module-translation": "100.4.6", - "magento/module-ui": "101.2.6", - "magento/module-ups": "100.4.6", - "magento/module-url-rewrite": "102.0.5", - "magento/module-user": "101.2.6", - "magento/module-usps": "100.4.5", - "magento/module-variable": "100.4.4", - "magento/module-vault": "101.2.6", - "magento/module-vault-graph-ql": "100.4.2", - "magento/module-version": "100.4.3", - "magento/module-webapi": "100.4.5", - "magento/module-webapi-async": "100.4.4", - "magento/module-webapi-security": "100.4.3", - "magento/module-weee": "100.4.6", - "magento/module-widget": "101.2.6", - "magento/module-wishlist": "101.2.6", - "magento/module-wishlist-graph-ql": "100.4.6", - "magento/module-wishlist-analytics": "100.4.4", - "magento/theme-adminhtml-backend": "100.4.6", - "magento/theme-frontend-blank": "100.4.6", - "magento/theme-frontend-luma": "100.4.6", - "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.6", - "magento/framework-amqp": "100.4.4", - "magento/framework-bulk": "101.0.2", - "magento/framework-message-queue": "100.4.6", + "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-open-search": "*", + "magento/module-elasticsearch": "*", + "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.5", - "magento/module-aws-s3": "100.4.4", - "magento/module-remote-storage": "100.4.4", - "magento/module-jwt-framework-adapter": "100.4.2", - "magento/module-jwt-user-token": "100.4.1" + "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 4ba00519ea8df39188dea522c8761ce78b1c0315 Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Thu, 1 Jun 2023 13:03:36 +0530 Subject: [PATCH 250/277] Alternate solution suggested by Bubasuma --- .../Controller/Adminhtml/Import/Download.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php index 2b783ef4d58f4..b74f48685feed 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php @@ -106,19 +106,13 @@ public function execute() $fileSize = $this->sampleFileProvider->getSize($entityName); $fileName = $entityName . '.csv'; - $this->fileFactory->create( + return $this->fileFactory->create( $fileName, - null, + $fileContents, DirectoryList::VAR_IMPORT_EXPORT, 'application/octet-stream', $fileSize ); - - $resultRaw = $this->resultRawFactory->create(); - $resultRaw->setContents($fileContents) - ->setHeader('Content-Disposition', 'attachment; filename=' . $fileName); - - return $resultRaw; } /** From 4f649112430b7892517c5b7130c63eeb86bae353 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Thu, 1 Jun 2023 15:22:43 +0530 Subject: [PATCH 251/277] #AC-8887::CNS WebAPI Broken and Failed Integration tests 2.4.7-beta1-develop S3-mimetype changes for media API --- .../Model/Product/Gallery/GalleryManagement.php | 13 +++++++++++-- app/code/Magento/Catalog/composer.json | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index 4034c75f7373c..85a69a9e69be0 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -6,6 +6,7 @@ namespace Magento\Catalog\Model\Product\Gallery; +use Magento\AwsS3\Driver\AwsS3; use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; use Magento\Catalog\Api\Data\ProductInterfaceFactory; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -287,10 +288,18 @@ 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); + $fileDriver = $mediaDirectory->getDriver(); + $imageFileContent = $fileDriver->fileGetContents($path); + + if ($fileDriver instanceof AwsS3) { + $remoteMediaMimeType = $fileDriver->getMetadata($path); + $mediaMimeType = $remoteMediaMimeType['mimetype']; + } else { + $mediaMimeType = $this->mime->getMimeType($path); + } return $this->imageContentInterface->create() ->setName($fileName) ->setBase64EncodedData(base64_encode($imageFileContent)) - ->setType($this->mime->getMimeType($path)); + ->setType($mediaMimeType); } } diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index 4421b2991266b..73f8d988bf270 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -31,7 +31,8 @@ "magento/module-ui": "*", "magento/module-url-rewrite": "*", "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/module-wishlist": "*", + "magento/module-aws-s3": "*" }, "suggest": { "magento/module-cookie": "*", From 0f6071cd9ac08d93d60cad99235b3136b7500605 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Wed, 31 May 2023 20:40:53 -0500 Subject: [PATCH 252/277] ACPT-1327 No longer resetting _idFieldName or _map. Also adding reset for Eav/Model/ResourceModel/Form/Attribute/Collection --- .../Cms/Model/ResourceModel/Block/Collection.php | 10 ---------- .../Cms/Model/ResourceModel/Page/Collection.php | 10 ---------- .../ResourceModel/Form/Attribute/Collection.php | 10 ++++++++++ .../Model/ResourceModel/Queue/Collection.php | 9 --------- .../ResourceModel/Subscriber/Collection.php | 16 ---------------- .../Model/ResourceModel/Rule/Collection.php | 9 --------- .../Framework/Data/Collection/AbstractDb.php | 4 ++-- 7 files changed, 12 insertions(+), 56 deletions(-) diff --git a/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php b/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php index 2d5a2e376eef3..7d30908a2d9d6 100644 --- a/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php +++ b/app/code/Magento/Cms/Model/ResourceModel/Block/Collection.php @@ -54,16 +54,6 @@ protected function _construct() $this->_map['fields']['block_id'] = 'main_table.block_id'; } - /** - * @inheritDoc - */ - public function _resetState(): void - { - parent::_resetState(); - $this->_map['fields']['store'] = 'store_table.store_id'; - $this->_map['fields']['block_id'] = 'main_table.block_id'; - } - /** * Returns pairs block_id - title * diff --git a/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php b/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php index 4c3e9be664409..6aafb010fb625 100644 --- a/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php +++ b/app/code/Magento/Cms/Model/ResourceModel/Page/Collection.php @@ -47,16 +47,6 @@ protected function _construct() $this->_map['fields']['store'] = 'store_table.store_id'; } - /** - * @inheritDoc - */ - public function _resetState(): void - { - parent::_resetState(); - $this->_map['fields']['page_id'] = 'main_table.page_id'; - $this->_map['fields']['store'] = 'store_table.store_id'; - } - /** * Set first store flag * diff --git a/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php index 9438178e56085..aef7d4bcb23da 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php @@ -96,6 +96,16 @@ protected function _construct() } } + /** + * @inheritDoc + */ + public function _resetState(): void + { + parent::_resetState(); + $this->_store = null; + $this->_entityType = null; + } + /** * Get EAV website table * diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php index 00c9d1736d857..bd7c62e82e630 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php @@ -67,15 +67,6 @@ protected function _construct() $this->_init(\Magento\Newsletter\Model\Queue::class, \Magento\Newsletter\Model\ResourceModel\Queue::class); } - /** - * @inheritDoc - */ - public function _resetState(): void - { - parent::_resetState(); - $this->_map['fields']['queue_id'] = 'main_table.queue_id'; - } - /** * Joins templates information * diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php index 224ee66f63af3..cc7357ac3572f 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php @@ -106,22 +106,6 @@ protected function _construct() $this->_map['fields']['store_id'] = 'main_table.store_id'; } - /** - * @inheritDoc - */ - public function _resetState(): void - { - parent::_resetState(); - $this->_map['fields']['type'] = $this->getResource()->getConnection()->getCheckSql( - 'main_table.customer_id = 0', - 1, - 2 - ); - $this->_map['fields']['website_id'] = 'store.website_id'; - $this->_map['fields']['group_id'] = 'store.group_id'; - $this->_map['fields']['store_id'] = 'main_table.store_id'; - } - /** * Set loading mode subscribers by queue * diff --git a/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php b/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php index a78aa2590a6eb..c7a3442306981 100644 --- a/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php +++ b/app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php @@ -96,15 +96,6 @@ protected function _construct() $this->_map['fields']['rule_id'] = 'main_table.rule_id'; } - /** - * @inheritDoc - */ - public function _resetState(): void - { - parent::_resetState(); - $this->_map['fields']['rule_id'] = 'main_table.rule_id'; - } - /** * Map data for associated entities * diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index f4c8df8c856e8..b6e53bdfde555 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -127,10 +127,10 @@ public function _resetState(): void { parent::_resetState(); $this->setConnection($this->_conn); - $this->_idFieldName = null; + // Note: not resetting _idFieldName because some subclasses define it class property $this->_bindParams = []; $this->_data = null; - $this->_map = null; + // Note: not resetting _map because some subclasses define it class property but not _construct method. $this->_fetchStmt = null; $this->_isOrdersRendered = false; $this->extensionAttributesJoinProcessor = null; From 44dc31647ae335c163d760026682e98dd54fcf14 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Thu, 1 Jun 2023 09:37:52 -0500 Subject: [PATCH 253/277] ACP2E-2015: Customizable Option Image link is broken --- .../Controller/Adminhtml/Index/Download.php | 2 +- .../Adminhtml/Index/DownloadTest.php | 24 +++++++---------- .../Controller/Adminhtml/History/Download.php | 3 ++- .../Adminhtml/History/DownloadTest.php | 19 +++++++++++-- .../Download/DownloadCustomOptionTest.php | 27 ++++++++++--------- 5 files changed, 45 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php index dbdd0679c69aa..252ca89ae411b 100644 --- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php +++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php @@ -69,7 +69,7 @@ public function execute() return $this->_fileFactory->create( $fileName, - $backup->output(), + ['type' => 'filename', 'value' => $backup->getPath() . DIRECTORY_SEPARATOR . $backup->getFileName()], DirectoryList::VAR_DIR, 'application/octet-stream', $backup->getSize() diff --git a/app/code/Magento/Backup/Test/Unit/Controller/Adminhtml/Index/DownloadTest.php b/app/code/Magento/Backup/Test/Unit/Controller/Adminhtml/Index/DownloadTest.php index 4ae20c711327f..b9c6b67cf1bc7 100644 --- a/app/code/Magento/Backup/Test/Unit/Controller/Adminhtml/Index/DownloadTest.php +++ b/app/code/Magento/Backup/Test/Unit/Controller/Adminhtml/Index/DownloadTest.php @@ -115,7 +115,7 @@ protected function setUp(): void ->getMock(); $this->backupModelMock = $this->getMockBuilder(Backup::class) ->disableOriginalConstructor() - ->setMethods(['getTime', 'exists', 'getSize', 'output']) + ->setMethods(['getTime', 'exists', 'getSize', 'output', 'getPath', 'getFileName']) ->getMock(); $this->dataHelperMock = $this->getMockBuilder(Data::class) ->disableOriginalConstructor() @@ -169,8 +169,13 @@ public function testExecuteBackupFound() $type = 'db'; $filename = 'filename'; $size = 10; - $output = 'test'; - + $path = 'testpath'; + $this->backupModelMock->expects($this->atLeastOnce()) + ->method('getPath') + ->willReturn($path); + $this->backupModelMock->expects($this->atLeastOnce()) + ->method('getFileName') + ->willReturn($filename); $this->backupModelMock->expects($this->atLeastOnce()) ->method('getTime') ->willReturn($time); @@ -180,9 +185,6 @@ public function testExecuteBackupFound() $this->backupModelMock->expects($this->atLeastOnce()) ->method('getSize') ->willReturn($size); - $this->backupModelMock->expects($this->atLeastOnce()) - ->method('output') - ->willReturn($output); $this->requestMock->expects($this->any()) ->method('getParam') ->willReturnMap( @@ -206,20 +208,14 @@ public function testExecuteBackupFound() $this->fileFactoryMock->expects($this->once()) ->method('create')->with( $filename, - null, + ['type' => 'filename', 'value' => $path . '/' . $filename], DirectoryList::VAR_DIR, 'application/octet-stream', $size ) ->willReturn($this->responseMock); - $this->resultRawMock->expects($this->once()) - ->method('setContents') - ->with($output); - $this->resultRawFactoryMock->expects($this->once()) - ->method('create') - ->willReturn($this->resultRawMock); - $this->assertSame($this->resultRawMock, $this->downloadController->execute()); + $this->assertSame($this->responseMock, $this->downloadController->execute()); } /** diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php b/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php index c207b56be17aa..6fd229f26a1a6 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/History/Download.php @@ -7,6 +7,7 @@ use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\ImportExport\Model\Import; /** * Download history controller @@ -62,7 +63,7 @@ public function execute() return $this->fileFactory->create( $fileName, - $reportHelper->getReportOutput($fileName), + ['type' => 'filename', 'value' => Import::IMPORT_HISTORY_DIR . $fileName], DirectoryList::VAR_IMPORT_EXPORT, 'application/octet-stream', $reportHelper->getReportSize($fileName) diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php index 57e33a1dd51a3..7c8e06d3f681d 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/History/DownloadTest.php @@ -9,14 +9,17 @@ use Magento\Backend\App\Action\Context; use Magento\Backend\Model\View\Result\Redirect; +use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\Request\Http; use Magento\Framework\App\Response\Http\FileFactory; +use Magento\Framework\App\ResponseInterface; use Magento\Framework\Controller\Result\Raw; use Magento\Framework\Controller\Result\RawFactory; use Magento\Framework\Controller\Result\RedirectFactory; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; use Magento\ImportExport\Controller\Adminhtml\History\Download; use Magento\ImportExport\Helper\Report; +use Magento\ImportExport\Model\Import; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -155,8 +158,20 @@ public function testExecute($requestFilename, $processedFilename) $this->reportHelper->method('importFileExists') ->with($processedFilename) ->willReturn(true); - $this->resultRaw->expects($this->once())->method('setContents'); - $this->downloadController->execute(); + + $responseMock = $this->getMockBuilder(ResponseInterface::class) + ->getMock(); + $this->fileFactory->expects($this->once()) + ->method('create') + ->with( + $processedFilename, + ['type' => 'filename', 'value' =>Import::IMPORT_HISTORY_DIR . $processedFilename], + DirectoryList::VAR_IMPORT_EXPORT, + 'application/octet-stream', + 1 + ) + ->willReturn($responseMock); + $this->assertSame($responseMock, $this->downloadController->execute()); } /** diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php index c870051b93554..93bdb1f189270 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php @@ -9,6 +9,7 @@ use Magento\Backend\App\Action\Context; use Magento\Framework\App\Request\Http; +use Magento\Framework\App\ResponseInterface; use Magento\Framework\Controller\Result\Forward; use Magento\Framework\Controller\Result\ForwardFactory; use Magento\Framework\Serialize\Serializer\Json; @@ -24,32 +25,32 @@ class DownloadCustomOptionTest extends TestCase /** * Option ID Test Value */ - const OPTION_ID = '123456'; + public const OPTION_ID = '123456'; /** * Option Code Test Value */ - const OPTION_CODE = 'option_123456'; + public const OPTION_CODE = 'option_123456'; /** * Option Product ID Value */ - const OPTION_PRODUCT_ID = 'option_test_product_id'; + public const OPTION_PRODUCT_ID = 'option_test_product_id'; /** * Option Type Value */ - const OPTION_TYPE = 'file'; + public const OPTION_TYPE = 'file'; /** * Option Value Test Value */ - const OPTION_VALUE = 'option_test_value'; + public const OPTION_VALUE = 'option_test_value'; /** * Option Value Test Value */ - const SECRET_KEY = 'secret_key'; + public const SECRET_KEY = 'secret_key'; /** * @var \Magento\Quote\Model\Quote\Item\Option|MockObject @@ -95,7 +96,7 @@ protected function setUp(): void $this->downloadMock = $this->getMockBuilder(Download::class) ->disableOriginalConstructor() - ->setMethods(['downloadFile']) + ->setMethods(['createResponse']) ->getMock(); $this->serializerMock = $this->getMockBuilder(Json::class) @@ -199,7 +200,8 @@ public function testExecute($itemOptionValues, $productOptionValues, $noRouteOcc ->willReturn($productOptionValues[self::OPTION_TYPE]); } if ($noRouteOccurs) { - $this->resultForwardMock->expects($this->once())->method('forward')->with('noroute')->willReturn(true); + $result = $this->resultForwardMock; + $this->resultForwardMock->expects($this->once())->method('forward')->with('noroute')->willReturnSelf(); } else { $unserializeResult = [self::SECRET_KEY => self::SECRET_KEY]; @@ -208,14 +210,15 @@ public function testExecute($itemOptionValues, $productOptionValues, $noRouteOcc ->with($itemOptionValues[self::OPTION_VALUE]) ->willReturn($unserializeResult); + $result = $this->getMockBuilder(ResponseInterface::class) + ->getMock(); $this->downloadMock->expects($this->once()) - ->method('downloadFile') + ->method('createResponse') ->with($unserializeResult) - ->willReturn(true); + ->willReturn($result); - $this->objectMock->expects($this->once())->method('endExecute')->willReturn(true); } - $this->objectMock->execute(); + $this->assertSame($result, $this->objectMock->execute()); } /** From 5ff276c78052b2a25e6c5db40b5b92cb779cbd8e Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Thu, 1 Jun 2023 21:28:29 +0530 Subject: [PATCH 254/277] [mainline-integration-tests] Fixing the flaky test --- .../Mftf/Test/StoreFrontGuestCheckingWithMultishipmentTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontGuestCheckingWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontGuestCheckingWithMultishipmentTest.xml index 82563e5055c2a..07b2834fa04d4 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontGuestCheckingWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontGuestCheckingWithMultishipmentTest.xml @@ -44,6 +44,7 @@ </actionGroup> <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> <click selector="{{MultishippingSection.checkoutWithMultipleAddresses}}" stepKey="proceedMultishipping"/> + <waitForElementClickable selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitForCreateAccount"/> <click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickCreateAccount"/> <seeElement selector="{{CheckoutShippingSection.region}}" stepKey="seeRegionSelector"/> </test> From 79ba795b960b0366763244808bc64a89d09c8697 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 17 May 2023 16:54:48 +0300 Subject: [PATCH 255/277] ACP2E-1958: avoid reloading configs for each requested key --- lib/internal/Magento/Framework/App/DeploymentConfig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig.php index ce8bb38795b5c..0937347997f06 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig.php @@ -84,7 +84,9 @@ public function get($key = null, $defaultValue = null) } $result = $this->getByKey($key); if ($result === null) { - $this->reloadData(); + if (empty($this->flatData)) { + $this->reloadData(); + } $result = $this->getByKey($key); } return $result ?? $defaultValue; From 9b839c0658f22cb86454792fe6ee95d989be581f Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 17 May 2023 18:06:40 +0300 Subject: [PATCH 256/277] ACP2E-1958: avoid reloading configs for each requested key; added unit tests --- .../Framework/App/DeploymentConfig.php | 38 +++++++++++++------ .../App/Test/Unit/DeploymentConfigTest.php | 29 +++++++++++++- 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig.php index 0937347997f06..9fd369bd03fb1 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig.php @@ -51,6 +51,11 @@ class DeploymentConfig */ private $overrideData; + /** + * @var array + */ + private $envOverrides = []; + /** * Constructor * @@ -76,6 +81,7 @@ public function __construct(DeploymentConfig\Reader $reader, $overrideData = []) */ public function get($key = null, $defaultValue = null) { + //if no key is requested, then all config is returned. if ($key === null) { if (empty($this->flatData)) { $this->reloadData(); @@ -84,7 +90,7 @@ public function get($key = null, $defaultValue = null) } $result = $this->getByKey($key); if ($result === null) { - if (empty($this->flatData)) { + if (empty($this->flatData) || count($this->getAllEnvOverrides())) { $this->reloadData(); } $result = $this->getByKey($key); @@ -181,19 +187,29 @@ private function reloadData(): void ); // flatten data for config retrieval using get() $this->flatData = $this->flattenParams($this->data); + $this->flatData = $this->getAllEnvOverrides() + $this->flatData; + } - // allow reading values from env variables by convention - // MAGENTO_DC_{path}, like db/connection/default/host => - // can be overwritten by MAGENTO_DC_DB__CONNECTION__DEFAULT__HOST - foreach (getenv() as $key => $value) { - if (false !== \strpos($key, self::MAGENTO_ENV_PREFIX) - && $key !== self::OVERRIDE_KEY - ) { - // convert MAGENTO_DC_DB__CONNECTION__DEFAULT__HOST into db/connection/default/host - $flatKey = strtolower(str_replace([self::MAGENTO_ENV_PREFIX, '__'], ['', '/'], $key)); - $this->flatData[$flatKey] = $value; + /** + * @return array + */ + private function getAllEnvOverrides(): array + { + if (empty($this->envOverrides)) { + // allow reading values from env variables by convention + // MAGENTO_DC_{path}, like db/connection/default/host => + // can be overwritten by MAGENTO_DC_DB__CONNECTION__DEFAULT__HOST + foreach (getenv() as $key => $value) { + if (false !== \strpos($key, self::MAGENTO_ENV_PREFIX) + && $key !== self::OVERRIDE_KEY + ) { + // convert MAGENTO_DC_DB__CONNECTION__DEFAULT__HOST into db/connection/default/host + $flatKey = strtolower(str_replace([self::MAGENTO_ENV_PREFIX, '__'], ['', '/'], $key)); + $this->envOverrides[$flatKey] = $value; + } } } + return $this->envOverrides; } /** diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php index 42b4d7866c23b..78e9d27c7ab21 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php @@ -50,6 +50,14 @@ class DeploymentConfigTest extends TestCase 'test_override' => 'overridden', ]; + /** + * @var array + */ + private static $flattenedFixtureSecond + = [ + 'test_override' => 'overridden2' + ]; + /** * @var array */ @@ -112,6 +120,25 @@ public function testGetters(): void $this->assertSame('overridden', $this->deploymentConfig->get('test_override')); } + /** + * @return void + * @throws FileSystemException + * @throws RuntimeException + */ + public function testGettersReloadConfig(): void + { + $this->readerMock->expects($this->any())->method('load')->willReturn(self::$flattenedFixtureSecond); + $this->deploymentConfig = new DeploymentConfig( + $this->readerMock, + ['test_override' => 'overridden2'] + ); + $this->assertNull($this->deploymentConfig->get('invalid_key')); + $this->assertNull($this->deploymentConfig->getConfigData('invalid_key')); + putenv('MAGENTO_DC_A=abc'); + $this->assertSame('abc', $this->deploymentConfig->get('a')); + $this->assertSame('overridden2', $this->deploymentConfig->get('test_override')); + } + /** * @return void * @throws FileSystemException @@ -149,7 +176,7 @@ public function testNotAvailable(): void */ public function testNotAvailableThenAvailable(): void { - $this->readerMock->expects($this->exactly(2))->method('load')->willReturn(['Test']); + $this->readerMock->expects($this->exactly(1))->method('load')->willReturn(['Test']); $object = new DeploymentConfig($this->readerMock); $this->assertFalse($object->isAvailable()); $this->assertFalse($object->isAvailable()); From 992ca88f86d31f49a989fb2746b99585e89bc6cc Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 17 May 2023 18:32:34 +0300 Subject: [PATCH 257/277] ACP2E-1958: avoid reloading configs for each requested key; added unit tests --- .../Framework/App/DeploymentConfig.php | 28 ++++++++++++++++--- .../App/Test/Unit/DeploymentConfigTest.php | 2 +- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig.php index 9fd369bd03fb1..fc66f5855b2c2 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig.php @@ -56,6 +56,11 @@ class DeploymentConfig */ private $envOverrides = []; + /** + * @var array + */ + private $readerLoad = []; + /** * Constructor * @@ -122,13 +127,13 @@ public function getConfigData($key = null) { if ($key === null) { if (empty($this->data)) { - $this->reloadData(); + $this->reloadInitialData(); } return $this->data; } $result = $this->getConfigDataByKey($key); if ($result === null) { - $this->reloadData(); + $this->reloadInitialData(); $result = $this->getConfigDataByKey($key); } return $result; @@ -178,13 +183,28 @@ private function getEnvOverride() : array * @throws FileSystemException * @throws RuntimeException */ - private function reloadData(): void + private function reloadInitialData(): void { + if (empty($this->readerLoad)) { + $this->readerLoad = $this->reader->load(); + } $this->data = array_replace( - $this->reader->load(), + $this->readerLoad, $this->overrideData ?? [], $this->getEnvOverride() ); + } + + /** + * Loads the configuration data + * + * @return void + * @throws FileSystemException + * @throws RuntimeException + */ + private function reloadData(): void + { + $this->reloadInitialData(); // flatten data for config retrieval using get() $this->flatData = $this->flattenParams($this->data); $this->flatData = $this->getAllEnvOverrides() + $this->flatData; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php index 78e9d27c7ab21..6d731222c6eb4 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php @@ -228,7 +228,7 @@ public function keyCollisionDataProvider(): array */ public function testResetData(): void { - $this->readerMock->expects($this->exactly(2))->method('load')->willReturn(self::$fixture); + $this->readerMock->expects($this->exactly(1))->method('load')->willReturn(self::$fixture); $this->assertSame(self::$flattenedFixture, $this->deploymentConfig->get()); $this->deploymentConfig->resetData(); // second time to ensure loader will be invoked only once after reset From 81dc33ea98d53362edfa4ebf1aa53f353174aec3 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 17 May 2023 20:24:41 +0300 Subject: [PATCH 258/277] ACP2E-1958: avoid reloading configs for each requested key; added unit tests --- lib/internal/Magento/Framework/App/DeploymentConfig.php | 2 +- .../Magento/Framework/App/Test/Unit/DeploymentConfigTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig.php index fc66f5855b2c2..262204d84d988 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig.php @@ -185,7 +185,7 @@ private function getEnvOverride() : array */ private function reloadInitialData(): void { - if (empty($this->readerLoad)) { + if (empty($this->readerLoad) || empty($this->data) || empty($this->flatData)) { $this->readerLoad = $this->reader->load(); } $this->data = array_replace( diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php index 6d731222c6eb4..78e9d27c7ab21 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php @@ -228,7 +228,7 @@ public function keyCollisionDataProvider(): array */ public function testResetData(): void { - $this->readerMock->expects($this->exactly(1))->method('load')->willReturn(self::$fixture); + $this->readerMock->expects($this->exactly(2))->method('load')->willReturn(self::$fixture); $this->assertSame(self::$flattenedFixture, $this->deploymentConfig->get()); $this->deploymentConfig->resetData(); // second time to ensure loader will be invoked only once after reset From 34601c7076b4f3926d72f89e1ef2481290b5375b Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 17 May 2023 20:27:49 +0300 Subject: [PATCH 259/277] ACP2E-1958: avoid reloading configs for each requested key; added unit tests --- lib/internal/Magento/Framework/App/DeploymentConfig.php | 3 ++- lib/internal/Magento/Framework/Module/ModuleList.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig.php index 262204d84d988..a14354b4fdb9a 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig.php @@ -86,7 +86,6 @@ public function __construct(DeploymentConfig\Reader $reader, $overrideData = []) */ public function get($key = null, $defaultValue = null) { - //if no key is requested, then all config is returned. if ($key === null) { if (empty($this->flatData)) { $this->reloadData(); @@ -211,6 +210,8 @@ private function reloadData(): void } /** + * Load all getenv() configs once + * * @return array */ private function getAllEnvOverrides(): array diff --git a/lib/internal/Magento/Framework/Module/ModuleList.php b/lib/internal/Magento/Framework/Module/ModuleList.php index 757411465304a..4ee0598c7a3c8 100644 --- a/lib/internal/Magento/Framework/Module/ModuleList.php +++ b/lib/internal/Magento/Framework/Module/ModuleList.php @@ -140,8 +140,9 @@ public function isModuleInfoAvailable() */ private function loadConfigData() { - if (null === $this->configData && null !== $this->config->get(ConfigOptionsListConstants::KEY_MODULES)) { - $this->configData = $this->config->get(ConfigOptionsListConstants::KEY_MODULES); + $config = $this->config->get(ConfigOptionsListConstants::KEY_MODULES); + if (null === $this->configData && null !== $config) { + $this->configData = $config; } } From f0d1035727f5223906ffd5f81492990a35020b65 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 17 May 2023 20:29:37 +0300 Subject: [PATCH 260/277] ACP2E-1958: avoid reloading configs for each requested key; added unit tests --- lib/internal/Magento/Framework/Module/ModuleList.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Module/ModuleList.php b/lib/internal/Magento/Framework/Module/ModuleList.php index 4ee0598c7a3c8..b458b60b9caba 100644 --- a/lib/internal/Magento/Framework/Module/ModuleList.php +++ b/lib/internal/Magento/Framework/Module/ModuleList.php @@ -140,9 +140,11 @@ public function isModuleInfoAvailable() */ private function loadConfigData() { - $config = $this->config->get(ConfigOptionsListConstants::KEY_MODULES); - if (null === $this->configData && null !== $config) { - $this->configData = $config; + if (null === $this->configData) { + $config = $this->config->get(ConfigOptionsListConstants::KEY_MODULES); + if (null !== $config) { + $this->configData = $config; + } } } From 9521e879db6e3c4e9745bb9f0e36cedc3e2d9487 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 18 May 2023 11:22:13 +0300 Subject: [PATCH 261/277] ACP2E-1958: avoid reloading configs for each requested key; added unit tests --- .../Magento/Framework/Module/Test/Unit/ModuleListTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/ModuleListTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/ModuleListTest.php index 07d35c77026eb..c532af8580ca6 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/ModuleListTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/ModuleListTest.php @@ -129,7 +129,7 @@ public function testIsModuleInfoAvailableNoConfig(): void { $this->config ->method('get') - ->willReturnOnConsecutiveCalls(['modules' => 'testModule'], null); + ->willReturnOnConsecutiveCalls(null); $this->assertFalse($this->model->isModuleInfoAvailable()); } @@ -144,7 +144,7 @@ public function testIsModuleInfoAvailableNoConfig(): void private function setLoadConfigExpectation($isExpected = true): void { if ($isExpected) { - $this->config->expects($this->exactly(2))->method('get')->willReturn(self::$enabledFixture); + $this->config->expects($this->once())->method('get')->willReturn(self::$enabledFixture); } else { $this->config->expects($this->never())->method('get'); } From b12ed720a04a23c4225e19524762bb7b2b642011 Mon Sep 17 00:00:00 2001 From: Andrii Dimov <andimov@gmail.com> Date: Fri, 2 Jun 2023 00:30:22 -0500 Subject: [PATCH 262/277] ACPT-1359: Fix testObserverHasNoExtraPublicMethods test on PR --- .../Test/Integrity/ObserverImplementationTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/ObserverImplementationTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/ObserverImplementationTest.php index 360483b69eaef..45852174d4e35 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/ObserverImplementationTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/ObserverImplementationTest.php @@ -57,13 +57,19 @@ public function testObserverHasNoExtraPublicMethods() $errors = []; foreach (self::$observerClasses as $observerClass) { $reflection = (new \ReflectionClass($observerClass)); + $publicMethodsCount = 0; $maxCountMethod = $reflection->getConstructor() ? 2 : 1; + $publicMethods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC); + foreach ($publicMethods as $publicMethod) { + if (!str_starts_with($publicMethod->getName(), '_')) { + $publicMethodsCount++; + } + } - if (count($reflection->getMethods(\ReflectionMethod::IS_PUBLIC)) > $maxCountMethod) { + if ($publicMethodsCount > $maxCountMethod) { $errors[] = $observerClass; } } - $errors = array_diff($errors, [GetPriceConfigurationObserver::class]); if ($errors) { $errors = array_unique($errors); From 77f75591752cd27e6fa7f08c30a008b81c42e728 Mon Sep 17 00:00:00 2001 From: Andrii Kasian <akasian@adobe.com> Date: Fri, 2 Jun 2023 10:25:39 -0500 Subject: [PATCH 263/277] Proper generate classes with reset state method --- app/code/Magento/Store/Model/Store.php | 1 - .../Magento/TestFramework/Event/Transaction.php | 3 ++- .../Interception/Code/Generator/Interceptor.php | 2 +- .../Framework/ObjectManager/Code/Generator/Proxy.php | 12 +++++++++++- .../Magento/Framework/Session/SessionManager.php | 8 +++++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php index 6e5f13e971395..2c1ad47693870 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -468,7 +468,6 @@ protected function _construct() protected function _getSession() { if (!$this->_session->isSessionExists()) { - $this->_session->setName('store_' . $this->getCode()); $this->_session->start(); } return $this->_session; diff --git a/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php b/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php index 2add2ed48fb98..edc6f6d9159c5 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php @@ -110,6 +110,7 @@ function ($errNo, $errStr, $errFile, $errLine) use ($test) { $this->_eventManager->fireEvent('startTransaction', [$test]); restore_error_handler(); } catch (\Exception $e) { + $this->_isTransactionActive = false; $test->getTestResultObject()->addFailure( $test, new \PHPUnit\Framework\AssertionFailedError((string)$e), @@ -125,8 +126,8 @@ function ($errNo, $errStr, $errFile, $errLine) use ($test) { protected function _rollbackTransaction() { if ($this->_isTransactionActive) { - $this->_getConnection()->rollbackTransparentTransaction(); $this->_isTransactionActive = false; + $this->_getConnection()->rollbackTransparentTransaction(); $this->_eventManager->fireEvent('rollbackTransaction'); $this->_getConnection()->closeConnection(); } diff --git a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php index f04bea1030ade..1d0417ad23aca 100644 --- a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php +++ b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php @@ -92,7 +92,7 @@ protected function _getClassMethods() protected function isInterceptedMethod(\ReflectionMethod $method) { return !($method->isConstructor() || $method->isFinal() || $method->isStatic() || $method->isDestructor()) && - !in_array($method->getName(), ['__sleep', '__wakeup', '__clone']); + !in_array($method->getName(), ['__sleep', '__wakeup', '__clone', '_resetState']); } /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php index 2ed3859de4012..8bb78ba303e94 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php @@ -135,11 +135,21 @@ protected function _getClassMethods() ) && !in_array( $method->getName(), - ['__sleep', '__wakeup', '__clone', '__debugInfo'] + ['__sleep', '__wakeup', '__clone', '__debugInfo', '_resetState'] ) ) { $methods[] = $this->_getMethodInfo($method); } + if ($method->getName() === '_resetState') { + $methods[] = [ + 'name' => '_resetState', + 'returnType' => 'void', + 'body' => "if (\$this->_subject) {\n" . + " \$this->_subject->_resetState(); \n" . + "}\n", + 'docblock' => ['shortDescription' => 'Reset state of proxied instance'], + ]; + } } return $methods; diff --git a/lib/internal/Magento/Framework/Session/SessionManager.php b/lib/internal/Magento/Framework/Session/SessionManager.php index 5a6eea4cbef2c..f79f0900c2c28 100644 --- a/lib/internal/Magento/Framework/Session/SessionManager.php +++ b/lib/internal/Magento/Framework/Session/SessionManager.php @@ -638,7 +638,13 @@ private function initIniOptions() */ public function _resetState(): void { - session_write_close(); + if (session_status() === PHP_SESSION_ACTIVE) { + session_write_close(); + session_id(''); + } + session_name('PHPSESSID'); + session_unset(); static::$urlHostCache = []; + $_SESSION = []; } } From 79ebeb7a08b4148a0e6b675144696a5461df9bc9 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Fri, 2 Jun 2023 11:39:28 -0500 Subject: [PATCH 264/277] ACP2E-2015: Customizable Option Image link is broken --- .../App/FrontController/BuiltinPlugin.php | 3 +- .../App/FrontController/BuiltinPluginTest.php | 36 +++++++++++++++++++ .../Framework/App/PageCache/Kernel.php | 3 ++ .../App/Test/Unit/PageCache/KernelTest.php | 25 +++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php index 5340f5204e21e..061cc801d5d1e 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php @@ -5,6 +5,7 @@ */ namespace Magento\PageCache\Model\App\FrontController; +use Magento\Framework\App\PageCache\NotCacheableInterface; use Magento\Framework\App\Response\Http as ResponseHttp; /** @@ -73,7 +74,7 @@ public function aroundDispatch( $result = $this->kernel->load(); if ($result === false) { $result = $proceed($request); - if ($result instanceof ResponseHttp) { + if ($result instanceof ResponseHttp && !$result instanceof NotCacheableInterface) { $this->addDebugHeaders($result); $this->kernel->process($result); } diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php index 0827f84a21192..30e0e6a0276ad 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php @@ -11,6 +11,7 @@ use Laminas\Http\Header\GenericHeader; use Magento\Framework\App\FrontControllerInterface; use Magento\Framework\App\PageCache\Kernel; +use Magento\Framework\App\PageCache\NotCacheableInterface; use Magento\Framework\App\PageCache\Version; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Response\Http; @@ -243,6 +244,41 @@ public function testAroundDispatchDisabled($state): void ); } + /** + * @return void + */ + public function testAroundNotCacheableResponse(): void + { + $this->configMock + ->expects($this->once()) + ->method('getType') + ->willReturn(Config::BUILT_IN); + $this->configMock->expects($this->once()) + ->method('isEnabled') + ->willReturn(true); + $this->versionMock + ->expects($this->once()) + ->method('process'); + $this->kernelMock->expects($this->once()) + ->method('load') + ->willReturn(false); + $this->stateMock->expects($this->never()) + ->method('getMode'); + $this->kernelMock->expects($this->never()) + ->method('process'); + $this->responseMock->expects($this->never()) + ->method('setHeader'); + $notCacheableResponse = $this->createMock(NotCacheableInterface::class); + $this->assertSame( + $notCacheableResponse, + $this->plugin->aroundDispatch( + $this->frontControllerMock, + fn () => $notCacheableResponse, + $this->requestMock + ) + ); + } + /** * @return array */ diff --git a/lib/internal/Magento/Framework/App/PageCache/Kernel.php b/lib/internal/Magento/Framework/App/PageCache/Kernel.php index 47b9798e47ec6..bcf4b36666e9e 100644 --- a/lib/internal/Magento/Framework/App/PageCache/Kernel.php +++ b/lib/internal/Magento/Framework/App/PageCache/Kernel.php @@ -10,6 +10,8 @@ /** * Builtin cache processor + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Kernel { @@ -140,6 +142,7 @@ public function process(\Magento\Framework\App\Response\Http $response) $maxAge = $matches[1]; $response->setNoCacheHeaders(); if (($response->getHttpResponseCode() == 200 || $response->getHttpResponseCode() == 404) + && !$response instanceof NotCacheableInterface && ($this->request->isGet() || $this->request->isHead()) ) { $tagsHeader = $response->getHeader('X-Magento-Tags'); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php index 164286728f3b7..ea6b4cbf9b199 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php @@ -14,6 +14,7 @@ use Magento\Framework\App\PageCache\Cache; use Magento\Framework\App\PageCache\Identifier; use Magento\Framework\App\PageCache\Kernel; +use Magento\Framework\App\PageCache\NotCacheableInterface; use Magento\Framework\App\Request\Http; use Magento\Framework\App\Response\HttpFactory; use Magento\Framework\Serialize\SerializerInterface; @@ -328,4 +329,28 @@ public function processNotSaveCacheProvider(): array ['public, max-age=100, s-maxage=100', 200, false, true] ]; } + + public function testProcessNotSaveCacheForNotCacheableResponse(): void + { + $header = CacheControl::fromString("Cache-Control: public, max-age=100, s-maxage=100"); + $notCacheableResponse = $this->getMockBuilder(\Magento\Framework\App\Response\File::class) + ->disableOriginalConstructor() + ->getMock(); + + $notCacheableResponse->expects($this->once()) + ->method('getHeader') + ->with('Cache-Control') + ->willReturn($header); + $notCacheableResponse->expects($this->any()) + ->method('getHttpResponseCode') + ->willReturn(200); + $notCacheableResponse->expects($this->once()) + ->method('setNoCacheHeaders'); + $this->requestMock + ->expects($this->any())->method('isGet') + ->willReturn(true); + $this->fullPageCacheMock->expects($this->never()) + ->method('save'); + $this->kernel->process($notCacheableResponse); + } } From d7cd49f5242b59b30e5429f3f2bcccf3b2c7abb1 Mon Sep 17 00:00:00 2001 From: Andrii Dimov <andimov@gmail.com> Date: Mon, 5 Jun 2023 04:32:02 -0500 Subject: [PATCH 265/277] ACPT-1259: Fix Directory WebApi GraphQL tests on Application Server --- .../GraphQl/Store/AvailableStoresTest.php | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php index b2aa977bbb59f..17748b139c070 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php @@ -7,10 +7,12 @@ namespace Magento\GraphQl\Store; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\ObjectManagerInterface; use Magento\Store\Api\Data\StoreConfigInterface; use Magento\Store\Api\StoreConfigManagerInterface; use Magento\Store\Model\ResourceModel\Store as StoreResource; +use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\Store; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQlAbstract; @@ -175,6 +177,8 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r /** @var Store $store */ $store = $this->objectManager->get(Store::class); $this->storeResource->load($store, $storeConfig->getCode(), 'code'); + /* @var $scopeConfig ScopeConfigInterface */ + $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); $this->assertEquals($storeConfig->getId(), $responseConfig['id']); $this->assertEquals($storeConfig->getCode(), $responseConfig['code']); $this->assertEquals($store->getName(), $responseConfig['store_name']); @@ -200,12 +204,28 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r ); $this->assertEquals($storeConfig->getTimezone(), $responseConfig['timezone']); $this->assertEquals($storeConfig->getWeightUnit(), $responseConfig['weight_unit']); - $this->assertEquals($storeConfig->getBaseUrl(), $responseConfig['base_url']); - $this->assertEquals($storeConfig->getBaseLinkUrl(), $responseConfig['base_link_url']); + $this->assertEquals($storeConfig->getBaseUrl(), $responseConfig['base_url'], 'base_url'); + $this->assertEquals( + $scopeConfig->getValue( + 'web/unsecure/base_link_url', + ScopeInterface::SCOPE_STORE, + $storeConfig->getId() + ), + $responseConfig['base_link_url'], + 'base_link_url' + ); $this->assertEquals($storeConfig->getBaseStaticUrl(), $responseConfig['base_static_url']); $this->assertEquals($storeConfig->getBaseMediaUrl(), $responseConfig['base_media_url']); - $this->assertEquals($storeConfig->getSecureBaseUrl(), $responseConfig['secure_base_url']); - $this->assertEquals($storeConfig->getSecureBaseLinkUrl(), $responseConfig['secure_base_link_url']); + $this->assertEquals($storeConfig->getSecureBaseUrl(), $responseConfig['secure_base_url'], 'secure_base_url'); + $this->assertEquals( + $scopeConfig->getValue( + 'web/secure/base_link_url', + ScopeInterface::SCOPE_STORE, + $storeConfig->getId() + ), + $responseConfig['secure_base_link_url'], + 'secure_base_link_url' + ); $this->assertEquals($storeConfig->getSecureBaseStaticUrl(), $responseConfig['secure_base_static_url']); $this->assertEquals($storeConfig->getSecureBaseMediaUrl(), $responseConfig['secure_base_media_url']); $this->assertEquals($store->isUseStoreInUrl(), $responseConfig['use_store_in_url']); From d0aa9b23b80502ae2c377f52cda90dece407108c Mon Sep 17 00:00:00 2001 From: Andrii Dimov <andimov@gmail.com> Date: Mon, 5 Jun 2023 05:20:49 -0500 Subject: [PATCH 266/277] ACPT-1135: GraphQl scenarios fixes for Application server -- pr stabilization --- .../Magento/CatalogInventory/Model/Configuration.php | 3 --- .../Model/ResourceModel/Fulltext/Collection.php | 9 ++++++--- .../Eav/Model/ResourceModel/Attribute/Collection.php | 3 ++- .../Model/ResourceModel/Form/Attribute/Collection.php | 2 +- .../Model/ResourceModel/Subscriber/Collection.php | 2 +- app/code/Magento/Store/Model/StoreManager.php | 2 +- .../Magento/TestFramework/Event/Transaction.php | 1 + 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/Configuration.php b/app/code/Magento/CatalogInventory/Model/Configuration.php index c610a0350c9cc..9df634c225d71 100644 --- a/app/code/Magento/CatalogInventory/Model/Configuration.php +++ b/app/code/Magento/CatalogInventory/Model/Configuration.php @@ -13,9 +13,6 @@ use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; -/** - * Class Configuration - */ class Configuration implements StockConfigurationInterface, ResetAfterRequestInterface { /** diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php index 28a47bbac9c17..d29928306f24b 100644 --- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php @@ -249,7 +249,8 @@ private function getSearch() /** * Test search. * - * @deprecated 100.1.0 @see __construct + * @deprecated 100.1.0 + * @see __construct * @param \Magento\Search\Api\SearchInterface $object * @return void * @since 100.1.0 @@ -276,7 +277,8 @@ private function getSearchCriteriaBuilder() /** * Set search criteria builder. * - * @deprecated 100.1.0 @see __construct + * @deprecated 100.1.0 + * @see __construct * @param \Magento\Framework\Api\Search\SearchCriteriaBuilder $object * @return void * @since 100.1.0 @@ -302,7 +304,8 @@ private function getFilterBuilder() /** * Set filter builder. * - * @deprecated 100.1.0 @see __construct + * @deprecated 100.1.0 + * @see __construct * @param \Magento\Framework\Api\FilterBuilder $object * @return void * @since 100.1.0 diff --git a/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php index 7a1f4fe4cfcea..897640f852cc7 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Attribute/Collection.php @@ -10,6 +10,7 @@ /** * EAV additional attribute resource collection (Using Forms) * + * phpcs:disable Magento2.Classes.AbstractApi.AbstractApi * @api * @since 100.0.2 */ @@ -67,7 +68,7 @@ public function __construct( /** * @inheritDoc */ - public function _resetState(): void + public function _resetState(): void //phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedFunction { /* Note: because Eav attribute loading takes significant performance, we are not resetting it like other collections. */ diff --git a/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php index aef7d4bcb23da..063b6041782d7 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Form/Attribute/Collection.php @@ -203,6 +203,7 @@ public function setSortOrder($direction = self::SORT_ORDER_ASC) */ protected function _beforeLoad() { + $store = $this->getStore(); $select = $this->getSelect(); $connection = $this->getConnection(); $entityType = $this->getEntityType(); @@ -264,7 +265,6 @@ protected function _beforeLoad() } } - $store = $this->getStore(); $joinWebsiteExpression = $connection->quoteInto( 'sa.attribute_id = main_table.attribute_id AND sa.website_id = ?', (int)$store->getWebsiteId() diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php index cc7357ac3572f..d59bf28310778 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber/Collection.php @@ -32,7 +32,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab protected $_storeTable; /** - * Queue joined flag + * Flag for joined queue * * @var boolean */ diff --git a/app/code/Magento/Store/Model/StoreManager.php b/app/code/Magento/Store/Model/StoreManager.php index a28efb40d3d74..f6e7ebbc8d2fe 100644 --- a/app/code/Magento/Store/Model/StoreManager.php +++ b/app/code/Magento/Store/Model/StoreManager.php @@ -335,6 +335,6 @@ public function __debugInfo() */ public function _resetState(): void { - $this->reinitStores(); + $this->currentStoreId = null; } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php b/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php index edc6f6d9159c5..419cbde64d9b7 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php @@ -87,6 +87,7 @@ protected function _processTransactionRequests($eventName, \PHPUnit\Framework\Te * * @param \PHPUnit\Framework\TestCase $test * @SuppressWarnings(PHPMD.UnusedLocalVariable) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _startTransaction(\PHPUnit\Framework\TestCase $test) { From 1265864376c634d5d856600b59c30b6d2ecfbbe1 Mon Sep 17 00:00:00 2001 From: Andrii Dimov <andimov@gmail.com> Date: Mon, 5 Jun 2023 06:41:08 -0500 Subject: [PATCH 267/277] AC-8892: Failed core Integration tests on 2.4.7 with exporter extentions --- .../testsuite/Magento/GraphQl/_files/state-skip-list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php b/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php index 3225a27f41365..7033ed2436c6c 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/_files/state-skip-list.php @@ -37,6 +37,7 @@ 'customRemoteFilesystem' => null, Magento\Store\App\Config\Type\Scopes::class => null, Magento\Framework\Module\Dir\Reader::class => null, + Magento\Framework\Module\PackageInfo::class => null, Magento\Framework\App\Language\Dictionary::class => null, Magento\Framework\ObjectManager\ConfigInterface::class => null, Magento\Framework\App\Cache\Type\Config::class => null, From ce96cc5795d790805ae290e2e721d8bab69c4967 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 5 Jun 2023 17:48:29 +0530 Subject: [PATCH 268/277] ACP2E-2021: Unable to switch to the second store in the front end - Removed the plugin DeleteCookieWhenCustomerNotExistPlugin --- ...DeleteCookieWhenCustomerNotExistPlugin.php | 55 ------------------- app/code/Magento/Customer/etc/frontend/di.xml | 3 - 2 files changed, 58 deletions(-) delete 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 deleted file mode 100644 index 53e170f6026f8..0000000000000 --- a/app/code/Magento/Customer/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPlugin.php +++ /dev/null @@ -1,55 +0,0 @@ -<?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 e29f7cc1cf1ea..827a153e94674 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -130,7 +130,4 @@ <type name="Magento\Customer\Model\Session"> <plugin name="afterLogout" type="Magento\Customer\Model\Plugin\ClearSessionsAfterLogoutPlugin"/> </type> - <type name="Magento\Framework\App\FrontControllerInterface"> - <plugin name="delete-cookie-when-customer-not-exist" type="Magento\Customer\Model\App\FrontController\DeleteCookieWhenCustomerNotExistPlugin"/> - </type> </config> From 315aca45b38074d297e09cfc2b942b596bdb2893 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 5 Jun 2023 19:39:22 +0530 Subject: [PATCH 269/277] ACP2E-2021: Unable to switch to the second store in the front end - Fixed the issue by revert back the code ACP2E-1445. --- ...teCookieWhenCustomerNotExistPluginTest.php | 56 ----------------- .../Customer/ViewModel/Customer/Data.php | 63 ------------------- .../Customer/view/frontend/layout/default.xml | 6 +- .../frontend/templates/js/customer-data.phtml | 14 ++--- .../view/frontend/web/js/customer-data.js | 10 --- 5 files changed, 6 insertions(+), 143 deletions(-) delete mode 100644 app/code/Magento/Customer/Test/Unit/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPluginTest.php delete mode 100644 app/code/Magento/Customer/ViewModel/Customer/Data.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 deleted file mode 100644 index fd06dbf6b8004..0000000000000 --- a/app/code/Magento/Customer/Test/Unit/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPluginTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?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(); - } -} diff --git a/app/code/Magento/Customer/ViewModel/Customer/Data.php b/app/code/Magento/Customer/ViewModel/Customer/Data.php deleted file mode 100644 index 8c285b368c961..0000000000000 --- a/app/code/Magento/Customer/ViewModel/Customer/Data.php +++ /dev/null @@ -1,63 +0,0 @@ -<?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/view/frontend/layout/default.xml b/app/code/Magento/Customer/view/frontend/layout/default.xml index eba504a12a1e5..b431373ca4125 100644 --- a/app/code/Magento/Customer/view/frontend/layout/default.xml +++ b/app/code/Magento/Customer/view/frontend/layout/default.xml @@ -48,11 +48,7 @@ </arguments> </block> <block name="customer.customer.data" class="Magento\Customer\Block\CustomerData" - template="Magento_Customer::js/customer-data.phtml"> - <arguments> - <argument name="view_model" xsi:type="object">Magento\Customer\ViewModel\Customer\Data</argument> - </arguments> - </block> + template="Magento_Customer::js/customer-data.phtml"/> <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 7031778a8d473..eb50ea6454788 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,16 +3,10 @@ * 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"> { @@ -20,10 +14,12 @@ $expirableSectionNames = $block->getExpirableSectionNames(); "Magento_Customer/js/customer-data": { "sectionLoadUrl": "<?= $block->escapeJs($block->getCustomerDataUrl('customer/section/load')) ?>", "expirableSectionLifetime": <?= (int)$block->getExpirableSectionLifetime() ?>, - "expirableSectionNames": <?= /* @noEscape */ $viewModel->jsonEncode($expirableSectionNames) ?>, + "expirableSectionNames": <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class) + ->jsonEncode($block->getExpirableSectionNames()) ?>, "cookieLifeTime": "<?= $block->escapeJs($block->getCookieLifeTime()) ?>", - "updateSessionUrl": "<?= $block->escapeJs($customerDataUrl) ?>", - "isLoggedIn": "<?= /* @noEscape */ $viewModel->isLoggedIn() ?>" + "updateSessionUrl": "<?= $block->escapeJs( + $block->getCustomerDataUrl('customer/account/updateSession') + ) ?>" } } } 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 5ff83bbb9b14d..11ddc0386d86d 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,20 +47,10 @@ 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 9c1a6f40f61c0ea5de528a93055fc2fbfff77f16 Mon Sep 17 00:00:00 2001 From: Andrii Dimov <andimov@gmail.com> Date: Mon, 5 Jun 2023 09:45:37 -0500 Subject: [PATCH 270/277] ACPT-1135: GraphQl scenarios fixes for Application server -- pr stabilization --- .../GraphQl/Store/AvailableStoresTest.php | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php index 17748b139c070..b2aa977bbb59f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/AvailableStoresTest.php @@ -7,12 +7,10 @@ namespace Magento\GraphQl\Store; -use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\ObjectManagerInterface; use Magento\Store\Api\Data\StoreConfigInterface; use Magento\Store\Api\StoreConfigManagerInterface; use Magento\Store\Model\ResourceModel\Store as StoreResource; -use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\Store; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQlAbstract; @@ -177,8 +175,6 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r /** @var Store $store */ $store = $this->objectManager->get(Store::class); $this->storeResource->load($store, $storeConfig->getCode(), 'code'); - /* @var $scopeConfig ScopeConfigInterface */ - $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); $this->assertEquals($storeConfig->getId(), $responseConfig['id']); $this->assertEquals($storeConfig->getCode(), $responseConfig['code']); $this->assertEquals($store->getName(), $responseConfig['store_name']); @@ -204,28 +200,12 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r ); $this->assertEquals($storeConfig->getTimezone(), $responseConfig['timezone']); $this->assertEquals($storeConfig->getWeightUnit(), $responseConfig['weight_unit']); - $this->assertEquals($storeConfig->getBaseUrl(), $responseConfig['base_url'], 'base_url'); - $this->assertEquals( - $scopeConfig->getValue( - 'web/unsecure/base_link_url', - ScopeInterface::SCOPE_STORE, - $storeConfig->getId() - ), - $responseConfig['base_link_url'], - 'base_link_url' - ); + $this->assertEquals($storeConfig->getBaseUrl(), $responseConfig['base_url']); + $this->assertEquals($storeConfig->getBaseLinkUrl(), $responseConfig['base_link_url']); $this->assertEquals($storeConfig->getBaseStaticUrl(), $responseConfig['base_static_url']); $this->assertEquals($storeConfig->getBaseMediaUrl(), $responseConfig['base_media_url']); - $this->assertEquals($storeConfig->getSecureBaseUrl(), $responseConfig['secure_base_url'], 'secure_base_url'); - $this->assertEquals( - $scopeConfig->getValue( - 'web/secure/base_link_url', - ScopeInterface::SCOPE_STORE, - $storeConfig->getId() - ), - $responseConfig['secure_base_link_url'], - 'secure_base_link_url' - ); + $this->assertEquals($storeConfig->getSecureBaseUrl(), $responseConfig['secure_base_url']); + $this->assertEquals($storeConfig->getSecureBaseLinkUrl(), $responseConfig['secure_base_link_url']); $this->assertEquals($storeConfig->getSecureBaseStaticUrl(), $responseConfig['secure_base_static_url']); $this->assertEquals($storeConfig->getSecureBaseMediaUrl(), $responseConfig['secure_base_media_url']); $this->assertEquals($store->isUseStoreInUrl(), $responseConfig['use_store_in_url']); From fb89a1d1445f30f2c1d5686f3b41c9ab4770f5af Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 5 Jun 2023 20:44:16 +0530 Subject: [PATCH 271/277] ACP2E-2021: Unable to switch to the second store in the front end - Fixed the static test failure. --- .../Customer/view/frontend/templates/js/customer-data.phtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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..cecd9fd7e4088 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 @@ -5,6 +5,8 @@ */ /** @var \Magento\Customer\Block\CustomerData $block */ +/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */ +$jsonHelper = $block->getData('jsonHelper'); // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper ?> @@ -14,8 +16,7 @@ "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 */ $jsonHelper->jsonEncode($block->getExpirableSectionNames()) ?>, "cookieLifeTime": "<?= $block->escapeJs($block->getCookieLifeTime()) ?>", "updateSessionUrl": "<?= $block->escapeJs( $block->getCustomerDataUrl('customer/account/updateSession') From a6545ff404273762f41a8d1ef1ef010cfa6a1ae7 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 5 Jun 2023 22:14:38 +0530 Subject: [PATCH 272/277] ACP2E-2021: Unable to switch to the second store in the front end - Fixed the static test failure. --- .../Customer/view/frontend/templates/js/customer-data.phtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 cecd9fd7e4088..d7a36e4c55b3f 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 @@ -16,7 +16,9 @@ $jsonHelper = $block->getData('jsonHelper'); "Magento_Customer/js/customer-data": { "sectionLoadUrl": "<?= $block->escapeJs($block->getCustomerDataUrl('customer/section/load')) ?>", "expirableSectionLifetime": <?= (int)$block->getExpirableSectionLifetime() ?>, - "expirableSectionNames": <?= /* @noEscape */ $jsonHelper->jsonEncode($block->getExpirableSectionNames()) ?>, + "expirableSectionNames": <?= /* @noEscape */ $jsonHelper->jsonEncode( + $block->getExpirableSectionNames() + ) ?>, "cookieLifeTime": "<?= $block->escapeJs($block->getCookieLifeTime()) ?>", "updateSessionUrl": "<?= $block->escapeJs( $block->getCustomerDataUrl('customer/account/updateSession') From 93cd8cfb20b624e2f89efd22dc9f13c803642727 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Mon, 5 Jun 2023 17:07:10 -0500 Subject: [PATCH 273/277] ACP2E-2021: Unable to switch to the second store in the front end --- .../Customer/view/frontend/templates/js/customer-data.phtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d7a36e4c55b3f..f1a04502e5f98 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 @@ -6,9 +6,10 @@ /** @var \Magento\Customer\Block\CustomerData $block */ /** @var \Magento\Framework\Json\Helper\Data $jsonHelper */ -$jsonHelper = $block->getData('jsonHelper'); +$expirableSectionNames = $block->getExpirableSectionNames(); // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper +$jsonHelper = $this->helper(\Magento\Framework\Json\Helper\Data::class); ?> <script type="text/x-magento-init"> { From 840ffa9444f87d71805a9f930ab18fec46231f2f Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Mon, 5 Jun 2023 17:09:10 -0500 Subject: [PATCH 274/277] ACP2E-2021: Unable to switch to the second store in the front end --- .../Customer/view/frontend/templates/js/customer-data.phtml | 1 + 1 file changed, 1 insertion(+) 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 f1a04502e5f98..de5d0004a288b 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 @@ -9,6 +9,7 @@ $expirableSectionNames = $block->getExpirableSectionNames(); // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis $jsonHelper = $this->helper(\Magento\Framework\Json\Helper\Data::class); ?> <script type="text/x-magento-init"> From b31ee6b07fac227183867bcf6affdc2530998934 Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Wed, 7 Jun 2023 15:29:06 +0530 Subject: [PATCH 275/277] [mainline-integration-tests] Fixing the flaky test StoreFrontGuestCheckingWithMultishipmentTest --- .../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 f6587a757ff3e..b1eeeec6de62e 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml @@ -13,6 +13,6 @@ <element name="password" type="input" selector="#pass"/> <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"/> + <element name="createAnAccount" type="button" selector="(//div[contains(@class,'actions-toolbar')]//a[contains(.,'Create an Account')])[last()]" timeout="30"/> </section> </sections> From 8238e4fd9f83fd07e8270a958e4faf9889c30115 Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Thu, 15 Jun 2023 09:19:06 +0530 Subject: [PATCH 276/277] [mainline-integration-tests] Updating magento marketplace URL --- .../Magento/Marketplace/view/adminhtml/templates/index.phtml | 2 +- app/code/Magento/UrlRewrite/Test/Mftf/Data/UrlRewriteData.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml b/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml index ac39d72388e6c..709954bad3bda 100644 --- a/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml +++ b/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml @@ -61,7 +61,7 @@ )); ?> </p> <a class="action-secondary" target="_blank" - href="https://marketplace.magento.com/"> + href="https://commercemarketplace.adobe.com/"> <?= $block->escapeHtml(__('Visit Magento Marketplaces')) ?> </a> </div> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Data/UrlRewriteData.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Data/UrlRewriteData.xml index 3692e82072afc..404fcb52c91e9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Data/UrlRewriteData.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Data/UrlRewriteData.xml @@ -28,7 +28,7 @@ </entity> <entity name="customPermanentUrlRewrite" type="urlRewrite"> <data key="request_path" unique="prefix">wishlist</data> - <data key="target_path">https://marketplace.magento.com/</data> + <data key="target_path">https://commercemarketplace.adobe.com/</data> <data key="redirect_type">301</data> <data key="redirect_type_label">Permanent (301)</data> <data key="store_id">1</data> @@ -37,7 +37,7 @@ </entity> <entity name="customTemporaryUrlRewrite" type="urlRewrite"> <data key="request_path" unique="prefix">wishlist</data> - <data key="target_path">https://marketplace.magento.com/</data> + <data key="target_path">https://commercemarketplace.adobe.com/</data> <data key="redirect_type">302</data> <data key="redirect_type_label">Temporary (302)</data> <data key="store_id">1</data> From c065e16696c8938c670bb0ae8618cfeeb9ad43ee Mon Sep 17 00:00:00 2001 From: Keerthana SL <glo81187@adobe.com> Date: Thu, 15 Jun 2023 10:52:48 +0530 Subject: [PATCH 277/277] [mainline-integration-tests] Fixing static test error --- .../Magento/Marketplace/view/adminhtml/templates/index.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml b/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml index 709954bad3bda..fc58db1bed373 100644 --- a/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml +++ b/app/code/Magento/Marketplace/view/adminhtml/templates/index.phtml @@ -32,8 +32,8 @@ <h2 class="page-sub-title"><?= $block->escapeHtml(__('Partner search')) ?></h2> <p> <?= $block->escapeHtml(__( - 'Magento has a thriving ecosystem of technology partners to help merchants and brands deliver ' . - 'the best possible customer experiences. They are recognized as experts in eCommerce, ' . + 'Magento has a thriving ecosystem of technology partners to help merchants and brands deliver ' + . 'the best possible customer experiences. They are recognized as experts in eCommerce, ' . 'search, email marketing, payments, tax, fraud, optimization and analytics, fulfillment, ' . 'and more. Visit the Magento Partner Directory to see all of our trusted partners.' )); ?>