' . $this->escapeHtml(
+ $html = '
' . $this->_escaper->escapeHtml(
$product->getName()
) . '
' . '
';
foreach ($options as $option) {
$formattedOption = $this->getFormattedOptionValue($option);
- $html .= '- ' . $this->escapeHtml($option['label']) . '
';
- $html .= '- ' . $formattedOption['value'] . '
';
+ $html .= '- ' . $this->_escaper->escapeHtml($option['label']) . '
';
+ $html .= '- ' . $this->_escaper->escapeHtml($formattedOption['value']) . '
';
}
$html .= '
';
diff --git a/app/code/Magento/Customer/Controller/Account/EditPost.php b/app/code/Magento/Customer/Controller/Account/EditPost.php
index 499fc7d72f7fa..fc9a27124b641 100644
--- a/app/code/Magento/Customer/Controller/Account/EditPost.php
+++ b/app/code/Magento/Customer/Controller/Account/EditPost.php
@@ -237,17 +237,6 @@ public function execute()
$customer = $this->getCustomerDataObject($this->session->getCustomerId());
$customerCandidate = $this->populateNewCustomerDataObject($this->_request, $customer);
- $attributeToDelete = (string)$this->_request->getParam('delete_attribute_value');
- if ($attributeToDelete !== "") {
- $attributesToDelete = $this->prepareAttributesToDelete($attributeToDelete);
- foreach ($attributesToDelete as $attribute) {
- $uploadedValue = $this->_request->getParam($attribute . File::UPLOADED_FILE_SUFFIX);
- if ((string)$uploadedValue === "") {
- $this->deleteCustomerFileAttribute($customerCandidate, $attribute);
- }
- }
- }
-
try {
// whether a customer enabled change email option
$isEmailChanged = $this->processChangeEmailRequest($customer);
@@ -310,26 +299,6 @@ public function execute()
return $resultRedirect;
}
- /**
- * Convert comma-separated list of attributes to delete into array
- *
- * @param string $attribute
- * @return array
- */
- private function prepareAttributesToDelete(string $attribute) : array
- {
- $result = [];
- if ($attribute !== "") {
- if (str_contains($attribute, ',')) {
- $result = explode(',', $attribute);
- } else {
- $result[] = $attribute;
- }
- $result = array_unique($result);
- }
- return $result;
- }
-
/**
* Adds a complex success message if email confirmation is required
*
@@ -484,38 +453,4 @@ private function disableAddressValidation($customer)
$addressModel->setShouldIgnoreValidation(true);
}
}
-
- /**
- * Removes file attribute from customer entity and file from filesystem
- *
- * @param CustomerInterface $customerCandidateDataObject
- * @param string $attributeToDelete
- * @return void
- * @throws FileSystemException
- */
- private function deleteCustomerFileAttribute(
- CustomerInterface $customerCandidateDataObject,
- string $attributeToDelete
- ) : void {
- if ($attributeToDelete !== '') {
- $attributes = $this->prepareAttributesToDelete($attributeToDelete);
- foreach ($attributes as $attr) {
- $attributeValue = $customerCandidateDataObject->getCustomAttribute($attr);
- if ($attributeValue!== null) {
- if ($attributeValue->getValue() !== '') {
- $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
- $fileName = $attributeValue->getValue();
- $path = $mediaDirectory->getAbsolutePath('customer' . $fileName);
- if ($fileName && $mediaDirectory->isFile($path)) {
- $mediaDirectory->delete($path);
- }
- $customerCandidateDataObject->setCustomAttribute(
- $attr,
- ''
- );
- }
- }
- }
- }
- }
}
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php b/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php
index c57b53a56dbf0..0203b663a6755 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php
@@ -12,6 +12,7 @@
use Magento\Quote\Model\Quote\Item;
use Magento\Quote\Model\QuoteFactory;
use Magento\Quote\Model\ResourceModel\QuoteItemRetriever;
+use Magento\Framework\AuthorizationInterface;
/**
* Catalog composite product configuration controller
@@ -60,21 +61,30 @@ abstract class Cart extends \Magento\Backend\App\Action
* @var QuoteItemRetriever
*/
private $quoteItemRetriever;
+
+ /**
+ * @var AuthorizationInterface
+ */
+ protected $_authorization;
+
/**
* @param Action\Context $context
* @param CartRepositoryInterface $quoteRepository
* @param QuoteFactory $quoteFactory
* @param QuoteItemRetriever $quoteItemRetriever
+ * @param AuthorizationInterface $authorization
*/
public function __construct(
Action\Context $context,
CartRepositoryInterface $quoteRepository,
QuoteFactory $quoteFactory,
- QuoteItemRetriever $quoteItemRetriever
+ QuoteItemRetriever $quoteItemRetriever,
+ AuthorizationInterface $authorization
) {
$this->quoteRepository = $quoteRepository;
$this->quoteFactory = $quoteFactory;
$this->quoteItemRetriever = $quoteItemRetriever;
+ $this->_authorization = $authorization;
parent::__construct($context);
}
@@ -112,4 +122,13 @@ protected function _initData()
return $this;
}
+
+ /**
+ * @inheritdoc
+ */
+ protected function _isAllowed()
+ {
+ return $this->_authorization->isAllowed(self::ADMIN_RESOURCE)
+ && $this->_authorization->isAllowed('Magento_Cart::cart');
+ }
}
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php
index 910f4e94b90b7..6d544cfb75bc5 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php
@@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Customer\Controller\Adminhtml\Index;
use Magento\Backend\App\Action\Context;
@@ -43,6 +45,7 @@
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @deprecated 101.0.0
+ * @see no alternatives
*/
class Cart extends BaseAction implements HttpGetActionInterface, HttpPostActionInterface
{
@@ -55,6 +58,13 @@ class Cart extends BaseAction implements HttpGetActionInterface, HttpPostActionI
*/
private $storeManager;
+ /**
+ * Authorization level of a basic admin cart
+ *
+ * @see _isAllowed()
+ */
+ public const ADMIN_RESOURCE = 'Magento_Cart::cart';
+
/**
* Constructor
*
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Carts.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Carts.php
index bc9ca7628e132..b0d36fb2682a5 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Carts.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Carts.php
@@ -3,10 +3,23 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Customer\Controller\Adminhtml\Index;
-class Carts extends \Magento\Customer\Controller\Adminhtml\Index
+use Magento\Customer\Controller\Adminhtml\Index as BaseAction;
+use Magento\Framework\App\Action\HttpGetActionInterface;
+use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
+
+class Carts extends BaseAction implements HttpGetActionInterface, HttpPostActionInterface
{
+ /**
+ * Authorization level of a basic admin cart
+ *
+ * @see _isAllowed()
+ */
+ public const ADMIN_RESOURCE = 'Magento_Cart::cart';
+
/**
* Get shopping carts from all websites for specified client
*
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php
index 31971795d25d7..858ff810271e5 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php
@@ -180,8 +180,6 @@ protected function _extractCustomerData()
$customerData = [];
if ($this->getRequest()->getPost('customer')) {
$additionalAttributes = [
- CustomerInterface::DEFAULT_BILLING,
- CustomerInterface::DEFAULT_SHIPPING,
'confirmation',
'sendemail_store_id',
'extension_attributes',
diff --git a/app/code/Magento/Customer/Model/Metadata/Form/File.php b/app/code/Magento/Customer/Model/Metadata/Form/File.php
index 05788dcaf763c..089eae17bf6f5 100644
--- a/app/code/Magento/Customer/Model/Metadata/Form/File.php
+++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php
@@ -314,7 +314,7 @@ public function compactValue($value)
// Remove outdated file (in the case of file uploader UI component)
if (!empty($this->_value)
&& (!empty($value['delete'])
- || ($this->_entityTypeCode == 'customer' && empty($value)))
+ || ($this->_entityTypeCode === 'customer' && empty($value)))
) {
$this->fileProcessor->removeUploadedFile($this->_value);
return $value;
diff --git a/app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php b/app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php
index c6207896fc55d..1436453a88fbe 100644
--- a/app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php
+++ b/app/code/Magento/Customer/Model/Plugin/UpdateCustomer.php
@@ -52,14 +52,21 @@ public function beforeSave(
CustomerInterface $customer,
?string $passwordHash = null
): array {
- $customerSessionId = $this->userContext->getUserType() === $this->userContext::USER_TYPE_CUSTOMER ?
- (int)$this->userContext->getUserId() : 0;
+ $userType = $this->userContext->getUserType();
+ $customerSessionId = (int)$this->userContext->getUserId();
$customerId = (int)$this->request->getParam('customerId');
$bodyParams = $this->request->getBodyParams();
- if (!isset($bodyParams['customer']['Id']) && $customerId) {
- if ($customerId === $customerSessionId || $customerSessionId === 0) {
- $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer);
- }
+
+ if ($userType === UserContextInterface::USER_TYPE_CUSTOMER &&
+ !isset($bodyParams['customer']['Id']) &&
+ $customerId &&
+ $customerId === $customerSessionId
+ ) {
+ $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer);
+ } elseif ($customerId && in_array($userType, [UserContextInterface::USER_TYPE_ADMIN,
+ UserContextInterface::USER_TYPE_INTEGRATION], true)
+ ) {
+ $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer);
}
return [$customer, $passwordHash];
diff --git a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
index 6e11f903a391b..0a4834b885a80 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
@@ -206,17 +206,17 @@ public function save(CustomerInterface $customer, $passwordHash = null)
/** @var NewOperation|null $delegatedNewOperation */
$delegatedNewOperation = !$customer->getId() ? $this->delegatedStorage->consumeNewOperation() : null;
$prevCustomerData = $prevCustomerDataArr = null;
- if ($customer->getDefaultBilling()) {
- $this->validateDefaultAddress($customer, CustomerInterface::DEFAULT_BILLING);
- }
- if ($customer->getDefaultShipping()) {
- $this->validateDefaultAddress($customer, CustomerInterface::DEFAULT_SHIPPING);
- }
if ($customer->getId()) {
$prevCustomerData = $this->getById($customer->getId());
$prevCustomerDataArr = $this->prepareCustomerData($prevCustomerData->__toArray());
$customer->setCreatedAt($prevCustomerData->getCreatedAt());
}
+ if ($customer->getDefaultBilling()) {
+ $this->validateDefaultAddress($customer, $prevCustomerData, CustomerInterface::DEFAULT_BILLING);
+ }
+ if ($customer->getDefaultShipping()) {
+ $this->validateDefaultAddress($customer, $prevCustomerData, CustomerInterface::DEFAULT_SHIPPING);
+ }
/** @var $customer \Magento\Customer\Model\Data\Customer */
$customerArr = $customer->__toArray();
$customer = $this->imageProcessor->save(
@@ -569,23 +569,24 @@ private function prepareCustomerData(array $customerData): array
* To validate default address
*
* @param CustomerInterface $customer
+ * @param CustomerInterface|null $prevCustomerData
* @param string $defaultAddressType
* @return void
* @throws InputException
*/
private function validateDefaultAddress(
CustomerInterface $customer,
+ ?CustomerInterface $prevCustomerData,
string $defaultAddressType
): void {
- $addressId = $defaultAddressType === CustomerInterface::DEFAULT_BILLING ? $customer->getDefaultBilling()
- : $customer->getDefaultShipping();
- if ($customer->getAddresses()) {
- foreach ($customer->getAddresses() as $address) {
- if ((int) $addressId === (int) $address->getId()) {
+ $defaultAddressId = $defaultAddressType === CustomerInterface::DEFAULT_BILLING ?
+ (int) $customer->getDefaultBilling() : (int) $customer->getDefaultShipping();
+ if ($prevCustomerData && $prevCustomerData->getAddresses()) {
+ foreach ($prevCustomerData->getAddresses() as $address) {
+ if ($defaultAddressId === (int) $address->getId()) {
return;
}
}
-
throw new InputException(
__(
'The %fieldName value is invalid. Set the correct value and try again.',
diff --git a/app/code/Magento/Customer/Plugin/AsyncRequestCustomerGroupAuthorization.php b/app/code/Magento/Customer/Plugin/AsyncRequestCustomerGroupAuthorization.php
index 5b5c8ce1fc0ca..295b33d2db14a 100644
--- a/app/code/Magento/Customer/Plugin/AsyncRequestCustomerGroupAuthorization.php
+++ b/app/code/Magento/Customer/Plugin/AsyncRequestCustomerGroupAuthorization.php
@@ -9,7 +9,6 @@
namespace Magento\Customer\Plugin;
use Magento\Customer\Api\Data\CustomerInterface;
-use Magento\Framework\App\ObjectManager;
use Magento\Framework\AuthorizationInterface;
use Magento\Framework\Exception\AuthorizationException;
use Magento\AsynchronousOperations\Model\MassSchedule;
@@ -26,6 +25,13 @@ class AsyncRequestCustomerGroupAuthorization
*/
public const ADMIN_RESOURCE = 'Magento_Customer::manage';
+ /**
+ * account create topic name
+ *
+ * @var string
+ */
+ private const TOPIC_NAME = 'async.magento.customer.api.accountmanagementinterface.createaccount.post';
+
/**
* @var AuthorizationInterface
*/
@@ -60,6 +66,11 @@ public function beforePublishMass(
string $groupId = null,
string $userId = null
) {
+ // only apply the plugin on account create.
+ if ($topic !== self::TOPIC_NAME) {
+ return;
+ }
+
foreach ($entitiesArray as $entityParams) {
foreach ($entityParams as $entity) {
if ($entity instanceof CustomerInterface) {
diff --git a/app/code/Magento/Customer/Plugin/Webapi/Controller/Rest/ValidateCustomerData.php b/app/code/Magento/Customer/Plugin/Webapi/Controller/Rest/ValidateCustomerData.php
deleted file mode 100644
index 63551ff5a7576..0000000000000
--- a/app/code/Magento/Customer/Plugin/Webapi/Controller/Rest/ValidateCustomerData.php
+++ /dev/null
@@ -1,56 +0,0 @@
-validateInputData($inputData[self::CUSTOMER_KEY]);
- }
- return [$inputData, $parameters];
- }
-
- /**
- * Validates InputData
- *
- * @param array $inputData
- * @return array
- */
- private function validateInputData(array $inputData): array
- {
- $result = [];
-
- $data = array_filter($inputData, function ($k) use (&$result) {
- $key = is_string($k) ? strtolower(str_replace('_', "", $k)) : $k;
- return !isset($result[$key]) && ($result[$key] = true);
- }, ARRAY_FILTER_USE_KEY);
-
- return array_map(function ($value) {
- return is_array($value) ? $this->validateInputData($value) : $value;
- }, $data);
- }
-}
diff --git a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml
index e821e69c148b8..4e169c0863360 100644
--- a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml
@@ -379,6 +379,7 @@
Magento
- 6161 West Centinela Avenue
+ - 16
Culver City
US
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml
index e5784c1a72d04..a87ab1f39361b 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml
@@ -18,6 +18,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml
index 05b7f01d4a393..9e448d8255e79 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml
@@ -18,6 +18,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
index 5596b4efc5020..60e71d3afc718 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
@@ -18,6 +18,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterAndVerifyInAdminTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterAndVerifyInAdminTest.xml
index 366d1805705b9..a441c503f6bee 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterAndVerifyInAdminTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterAndVerifyInAdminTest.xml
@@ -17,6 +17,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterTest.xml
index 95981aa11418c..e8456c3b18e14 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerSubscribeToNewsletterTest.xml
@@ -16,6 +16,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml
index f52f18bcc44ea..53235c330981c 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml
@@ -17,6 +17,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php
index 26e2b0b5b5933..3b7f6f53eee7c 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php
@@ -115,6 +115,7 @@ public function testRender($amountOption, $expectedHtml)
*/
public function optionHtmlProvider()
{
+ //phpcs:disable
return [
[
2,
@@ -123,9 +124,9 @@ public function optionHtmlProvider()
testProductName
- testLabel1
- - 1 x Configurable Product 49-option 3 $10.00
+ - 1 x Configurable Product 49-option 3 <span class="price">$10.00</span>
- testLabel2
- - 1 x Configurable Product 49-option 3 $10.00
+ - 1 x Configurable Product 49-option 3 <span class="price">$10.00</span>
HTML
@@ -137,11 +138,11 @@ public function optionHtmlProvider()
testProductName
- testLabel1
- - 1 x Configurable Product 49-option 3 $10.00
+ - 1 x Configurable Product 49-option 3 <span class="price">$10.00</span>
HTML
],
- ];
+ ];//phpcs:enable
}
}
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php
index 83c2a303833ae..ec981cb22d23a 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php
@@ -229,17 +229,12 @@ public function testExecute()
->method('extract')
->willReturn($customer);
- $attr = 'attr1';
- $this->request->expects($this->exactly(5))
+ $this->request->expects($this->exactly(3))
->method('getParam')
->withConsecutive(
- ['change_email'],
- [ 'delete_attribute_value'],
- [$attr . File::UPLOADED_FILE_SUFFIX]
+ ['change_email']
)->willReturnOnConsecutiveCalls(
- false,
- $attr,
- 'uploadedFileName'
+ false
);
$this->editPost->execute();
diff --git a/app/code/Magento/Customer/Test/Unit/Plugin/Webapi/Controller/Rest/ValidateCustomerDataTest.php b/app/code/Magento/Customer/Test/Unit/Plugin/Webapi/Controller/Rest/ValidateCustomerDataTest.php
deleted file mode 100644
index 72d5f36e2266f..0000000000000
--- a/app/code/Magento/Customer/Test/Unit/Plugin/Webapi/Controller/Rest/ValidateCustomerDataTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-validateCustomerDataObject = ObjectManager::getInstance()->get(ValidateCustomerData::class);
- $this->reflectionObject = new ReflectionClass(get_class($this->validateCustomerDataObject));
- }
-
- /**
- * Test if the customer Info is valid
- *
- * @param array $customerInfo
- * @param array $result
- * @dataProvider dataProviderInputData
- * @throws Exception
- */
- public function testValidateInputData(array $customerInfo, array $result)
- {
- $this->assertEquals(
- $result,
- $this->invokeValidateInputData('validateInputData', [$customerInfo])
- );
- }
-
- /**
- * @param string $methodName
- * @param array $arguments
- * @return mixed
- * @throws Exception
- */
- private function invokeValidateInputData(string $methodName, array $arguments = [])
- {
- $validateInputDataMethod = $this->reflectionObject->getMethod($methodName);
- $validateInputDataMethod->setAccessible(true);
- return $validateInputDataMethod->invokeArgs($this->validateCustomerDataObject, $arguments);
- }
-
- /**
- * @return array
- */
- public function dataProviderInputData(): array
- {
- return [
- [
- ['customer' => [
- 'id' => -1,
- 'Id' => 1,
- 'name' => [
- 'firstName' => 'Test',
- 'LastName' => 'user'
- ],
- 'isHavingOwnHouse' => 1,
- 'address' => [
- 'street' => '1st Street',
- 'Street' => '3rd Street',
- 'city' => 'London'
- ],
- ]
- ],
- ['customer' => [
- 'id' => -1,
- 'name' => [
- 'firstName' => 'Test',
- 'LastName' => 'user'
- ],
- 'isHavingOwnHouse' => 1,
- 'address' => [
- 'street' => '1st Street',
- 'city' => 'London'
- ],
- ]
- ],
- ['customer' => [
- 'id' => -1,
- '_Id' => 1,
- 'name' => [
- 'firstName' => 'Test',
- 'LastName' => 'user'
- ],
- 'isHavingOwnHouse' => 1,
- 'address' => [
- 'street' => '1st Street',
- 'city' => 'London'
- ],
- ]
- ],
- ]
- ];
- }
-}
diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json
index 822e82f2643ea..0efdf33e3523c 100644
--- a/app/code/Magento/Customer/composer.json
+++ b/app/code/Magento/Customer/composer.json
@@ -1,42 +1,43 @@
{
"name": "magento/module-customer",
"description": "N/A",
+ "type": "magento2-module",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ],
"config": {
"sort-packages": true
},
+ "version": "103.0.7-p5",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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-asynchronous-operations": "*"
+ "magento/module-cookie": "100.4.*",
+ "magento/module-customer-sample-data": "Sample Data version: 100.4.*",
+ "magento/module-webapi": "100.4.*",
+ "magento/module-asynchronous-operations": "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/Customer/etc/webapi_rest/di.xml b/app/code/Magento/Customer/etc/webapi_rest/di.xml
index c5d7a28a3651d..18627b68320ed 100644
--- a/app/code/Magento/Customer/etc/webapi_rest/di.xml
+++ b/app/code/Magento/Customer/etc/webapi_rest/di.xml
@@ -31,9 +31,6 @@
-
-
-
diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json
index faaa18d73ed87..41220d1ebeac4 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||~8.3.0",
- "magento/framework": "*",
- "magento/module-customer": "*",
- "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||~8.3.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 19bf39274e56f..e7a25afe97d40 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.3",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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 da9e0a73d47d8..515b736b87529 100644
--- a/app/code/Magento/CustomerGraphQl/composer.json
+++ b/app/code/Magento/CustomerGraphQl/composer.json
@@ -2,26 +2,27 @@
"name": "magento/module-customer-graph-ql",
"description": "N/A",
"type": "magento2-module",
- "require": {
- "php": "~8.1.0||~8.2.0||~8.3.0",
- "magento/module-authorization": "*",
- "magento/module-customer": "*",
- "magento/module-eav": "*",
- "magento/module-eav-graph-ql": "*",
- "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": "*",
- "magento/module-graph-ql-resolver-cache": "*"
- },
"license": [
"OSL-3.0",
"AFL-3.0"
],
+ "version": "100.4.7",
+ "require": {
+ "php": "~8.1.0||~8.2.0||~8.3.0",
+ "magento/module-authorization": "100.4.*",
+ "magento/module-customer": "103.0.*",
+ "magento/module-eav": "102.1.*",
+ "magento/module-eav-graph-ql": "100.4.*",
+ "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-resolver-cache": "100.4.*"
+ },
"autoload": {
"files": [
"registration.php"
@@ -31,3 +32,4 @@
}
}
}
+
diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json
index 90038eaa71e90..3bd22d02f3092 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.7",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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 16b33996caa1f..b6d3125082aa8 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.7",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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 0b058f6c80aae..44e486784ce51 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.7",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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 e9438df827460..a306e7c9c306e 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.6",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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/Model/Config/Backend/WeightUnit.php b/app/code/Magento/Directory/Model/Config/Backend/WeightUnit.php
new file mode 100644
index 0000000000000..60538c6b26637
--- /dev/null
+++ b/app/code/Magento/Directory/Model/Config/Backend/WeightUnit.php
@@ -0,0 +1,84 @@
+source = $source;
+ parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
+ }
+
+ /**
+ * Check whether weight unit value is acceptable or not
+ *
+ * @return $this
+ */
+ public function beforeSave()
+ {
+ if ($this->isValueChanged()) {
+ $weightUnit = $this->getData('value');
+ if (!in_array($weightUnit, $this->getOptions())) {
+ throw new LocalizedException(__('There was an error save new configuration value.'));
+ }
+ }
+
+ return parent::beforeSave();
+ }
+
+ /**
+ * Get available options for weight unit
+ *
+ * @return array
+ */
+ private function getOptions()
+ {
+ $options = $this->source->toOptionArray();
+
+ return array_column($options, 'value');
+ }
+}
diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json
index 53dd3b76ada62..e05549734bc1e 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.7-p4",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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/Directory/etc/adminhtml/system.xml b/app/code/Magento/Directory/etc/adminhtml/system.xml
index e38bc5cec0caf..a759e325e3697 100644
--- a/app/code/Magento/Directory/etc/adminhtml/system.xml
+++ b/app/code/Magento/Directory/etc/adminhtml/system.xml
@@ -157,6 +157,7 @@
Magento\Directory\Model\Config\Source\WeightUnit
+ Magento\Directory\Model\Config\Backend\WeightUnit
diff --git a/app/code/Magento/DirectoryGraphQl/composer.json b/app/code/Magento/DirectoryGraphQl/composer.json
index fcd83a63dd1a9..540c1d6344ad3 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||~8.3.0",
- "magento/module-directory": "*",
- "magento/module-store": "*",
- "magento/module-graph-ql": "*",
- "magento/framework": "*"
- },
"license": [
"OSL-3.0",
"AFL-3.0"
],
+ "version": "100.4.5",
+ "require": {
+ "php": "~8.1.0||~8.2.0||~8.3.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/Test/Mftf/Data/LinkData.xml b/app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml
index a406453438a63..7f0f3b301376f 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml
@@ -1,8 +1,8 @@
@@ -61,6 +61,17 @@
1
2
+
+ link-1
+ 2.43
+ 2
+ url
+ https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg
+ url
+ https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg
+ 0
+ 1
+
Api Downloadable Link
2.00
@@ -105,6 +116,12 @@
file
downloadableSampleLink_TestImage
+
+ downloadableSampleUrl
+ 1
+ url
+ https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/LinkDownloadableProductFromGuestToCustomerTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/LinkDownloadableProductFromGuestToCustomerTest.xml
index 3dbb6830e331c..3bad1d73c753e 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/LinkDownloadableProductFromGuestToCustomerTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/LinkDownloadableProductFromGuestToCustomerTest.xml
@@ -16,6 +16,7 @@
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml
index 1529750cbb293..cafa506235158 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml
@@ -33,12 +33,12 @@
-
+
-
+
@@ -63,9 +63,9 @@
-
+
-
+
@@ -74,9 +74,9 @@
-
+
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyOutOfStockDownloadableProductSamplesAreAccessibleTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyOutOfStockDownloadableProductSamplesAreAccessibleTest.xml
index 337d4c7dd38b5..0b44a96924509 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyOutOfStockDownloadableProductSamplesAreAccessibleTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyOutOfStockDownloadableProductSamplesAreAccessibleTest.xml
@@ -35,12 +35,12 @@
-
+
-
+
@@ -68,9 +68,9 @@
-
+
-
+
diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json
index f226a7905c89f..5ad5a3aad271c 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.7-p5",
"require": {
"php": "~8.1.0||~8.2.0||~8.3.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/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
index 7808a214dd76a..685a417546aa5 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
@@ -10,27 +10,28 @@
getData('catalogHelper');
if ($_item = $block->getItem()): ?>
- = $block->escapeHtml($_item->getName()) ?>
+ = $escaper->escapeHtml($_item->getName()) ?>
- = $block->escapeHtml(__('SKU')) ?>:
- = /* @noEscape */ implode('
', $catalogHelper->splitSku($block->getSku())) ?>
+ = $escaper->escapeHtml(__('SKU')) ?>:
+ = /* @noEscape */ implode('
', $catalogHelper->splitSku($escaper->escapeHtml($block->getSku()))) ?>
getOrderOptions()): ?>
getOrderOptions() as $_option): ?>
- - = $block->escapeHtml($_option['label']) ?>:
+ - = $escaper->escapeHtml($_option['label']) ?>:
-
- = $block->escapeHtml($_option['value']) ?>
+ = $escaper->escapeHtml($_option['value']) ?>
- = $block->escapeHtml($block->truncateString($_option['value'], 55, '', $_remainder)) ?>
+ = $escaper->escapeHtml($block->truncateString($_option['value'], 55, '', $_remainder)) ?>
- ...
- = $block->escapeHtml($_remainder) ?>
+ ...
+ = $escaper->escapeHtml($_remainder) ?>
- escapeJs($_id);
+ escapeJs($_id);
$scriptString = <<