Skip to content

Commit 6099f7c

Browse files
committed
Merge branch '2.3.1-release' into MC-14957
2 parents 263b038 + f6298ac commit 6099f7c

File tree

68 files changed

+1267
-1571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1267
-1571
lines changed

app/code/Magento/AuthorizenetAcceptjs/etc/payment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
1010
<methods>
1111
<method name="authorizenet_acceptjs">
12-
<allow_multiple_address>1</allow_multiple_address>
12+
<allow_multiple_address>0</allow_multiple_address>
1313
</method>
1414
</methods>
1515
</payment>

app/code/Magento/Backup/Controller/Adminhtml/Index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Backup\Controller\Adminhtml;
77

88
use Magento\Backend\App\Action;
9-
use Magento\Framework\App\Action\HttpGetActionInterface;
109
use Magento\Backup\Helper\Data as Helper;
1110
use Magento\Framework\App\ObjectManager;
1211

@@ -18,7 +17,7 @@
1817
* @since 100.0.2
1918
* @SuppressWarnings(PHPMD.AllPurposeAction)
2019
*/
21-
abstract class Index extends Action implements HttpGetActionInterface
20+
abstract class Index extends Action
2221
{
2322
/**
2423
* Authorization level of a basic admin session

app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Backup\Controller\Adminhtml\Index;
87

8+
use Magento\Framework\App\Action\HttpPostActionInterface;
99
use Magento\Framework\App\Filesystem\DirectoryList;
1010
use Magento\Framework\Filesystem;
1111

12-
class Create extends \Magento\Backup\Controller\Adminhtml\Index
12+
/**
13+
* Create backup controller
14+
*/
15+
class Create extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
1316
{
1417
/**
1518
* Create backup action.

app/code/Magento/Catalog/Controller/Adminhtml/Product/Builder.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Catalog\Controller\Adminhtml\Product;
79

10+
use Magento\Catalog\Api\Data\ProductInterface;
811
use Magento\Catalog\Model\ProductFactory;
912
use Magento\Cms\Model\Wysiwyg as WysiwygModel;
1013
use Magento\Framework\App\RequestInterface;
@@ -15,6 +18,11 @@
1518
use Magento\Catalog\Model\Product;
1619
use Magento\Catalog\Model\Product\Type as ProductTypes;
1720

21+
/**
22+
* Build a product based on a request
23+
*
24+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
25+
*/
1826
class Builder
1927
{
2028
/**
@@ -79,10 +87,11 @@ public function __construct(
7987
* Build product based on user request
8088
*
8189
* @param RequestInterface $request
82-
* @return \Magento\Catalog\Model\Product
90+
* @return ProductInterface
8391
* @throws \RuntimeException
92+
* @throws \Magento\Framework\Exception\LocalizedException
8493
*/
85-
public function build(RequestInterface $request)
94+
public function build(RequestInterface $request): ProductInterface
8695
{
8796
$productId = (int) $request->getParam('id');
8897
$storeId = $request->getParam('store', 0);
@@ -92,6 +101,9 @@ public function build(RequestInterface $request)
92101
if ($productId) {
93102
try {
94103
$product = $this->productRepository->getById($productId, true, $storeId);
104+
if ($attributeSetId) {
105+
$product->setAttributeSetId($attributeSetId);
106+
}
95107
} catch (\Exception $e) {
96108
$product = $this->createEmptyProduct(ProductTypes::DEFAULT_TYPE, $attributeSetId, $storeId);
97109
$this->logger->critical($e);
@@ -113,6 +125,8 @@ public function build(RequestInterface $request)
113125
}
114126

115127
/**
128+
* Create a product with the given properties
129+
*
116130
* @param int $typeId
117131
* @param int $attributeSetId
118132
* @param int $storeId

0 commit comments

Comments
 (0)