Skip to content

Commit 570724a

Browse files
committed
Merge branch '2.4-develop' into AC-1271
2 parents 3f55468 + c612267 commit 570724a

File tree

155 files changed

+5425
-3571
lines changed

Some content is hidden

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

155 files changed

+5425
-3571
lines changed

app/code/Magento/AsynchronousOperations/Controller/Adminhtml/Notification/Dismiss.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
use Magento\AsynchronousOperations\Model\BulkNotificationManagement;
99
use Magento\Backend\App\Action\Context;
1010
use Magento\Backend\App\Action;
11-
use Magento\Framework\App\Action\HttpGetActionInterface;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
1212
use Magento\Framework\Controller\ResultFactory;
1313

1414
/**
1515
* Class Bulk Notification Dismiss Controller
1616
*/
17-
class Dismiss extends Action implements HttpGetActionInterface
17+
class Dismiss extends Action implements HttpPostActionInterface
1818
{
1919
/**
2020
* @var BulkNotificationManagement
@@ -56,7 +56,7 @@ public function execute()
5656
$isAcknowledged = $this->notificationManagement->acknowledgeBulks($bulkUuids);
5757

5858
/** @var \Magento\Framework\Controller\Result\Json $result */
59-
$result = $this->resultFactory->create(ResultFactory::TYPE_RAW);
59+
$result = $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData(['']);
6060
if (!$isAcknowledged) {
6161
$result->setHttpResponseCode(400);
6262
}

app/code/Magento/AsynchronousOperations/Test/Unit/Controller/Adminhtml/Notification/DismissTest.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Magento\AsynchronousOperations\Model\BulkNotificationManagement;
1212
use Magento\Framework\App\RequestInterface;
1313
use Magento\Framework\Controller\Result\Json;
14-
use Magento\Framework\Controller\Result\Raw;
1514
use Magento\Framework\Controller\ResultFactory;
1615
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1716
use PHPUnit\Framework\MockObject\MockObject;
@@ -44,11 +43,6 @@ class DismissTest extends TestCase
4443
*/
4544
private $jsonResultMock;
4645

47-
/**
48-
* @var MockObject
49-
*/
50-
private $rawResultMock;
51-
5246
protected function setUp(): void
5347
{
5448
$objectManager = new ObjectManager($this);
@@ -84,10 +78,15 @@ public function testExecute()
8478

8579
$this->resultFactoryMock->expects($this->once())
8680
->method('create')
87-
->with(ResultFactory::TYPE_RAW, [])
88-
->willReturn($this->rawResultMock);
81+
->with(ResultFactory::TYPE_JSON, [])
82+
->willReturn($this->jsonResultMock);
83+
84+
$this->jsonResultMock->expects($this->once())
85+
->method('setData')
86+
->with([''])
87+
->willReturn($this->jsonResultMock);
8988

90-
$this->assertEquals($this->rawResultMock, $this->model->execute());
89+
$this->assertEquals($this->jsonResultMock, $this->model->execute());
9190
}
9291

9392
public function testExecuteSetsBadRequestResponseStatusIfBulkWasNotAcknowledgedCorrectly()
@@ -101,7 +100,12 @@ public function testExecuteSetsBadRequestResponseStatusIfBulkWasNotAcknowledgedC
101100

102101
$this->resultFactoryMock->expects($this->once())
103102
->method('create')
104-
->with(ResultFactory::TYPE_RAW, [])
103+
->with(ResultFactory::TYPE_JSON, [])
104+
->willReturn($this->jsonResultMock);
105+
106+
$this->jsonResultMock->expects($this->once())
107+
->method('setData')
108+
->with([''])
105109
->willReturn($this->jsonResultMock);
106110

107111
$this->notificationManagementMock->expects($this->once())

app/code/Magento/BundleGraphQl/etc/graphql/di.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,4 @@
114114
</argument>
115115
</arguments>
116116
</type>
117-
<type name="Magento\BundleGraphQl\Model\Resolver\Options\Label">
118-
<arguments>
119-
<argument name="product" xsi:type="object">Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Deferred\ChildProduct</argument>
120-
</arguments>
121-
</type>
122-
<type name="Magento\BundleGraphQl\Model\Resolver\PriceRange">
123-
<arguments>
124-
<argument name="productDataProvider" xsi:type="object">Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Deferred\ChildProduct</argument>
125-
</arguments>
126-
</type>
127-
<virtualType name="Magento\BundleGraphQl\Model\Resolver\Options\Product"
128-
type="Magento\CatalogGraphQl\Model\Resolver\Product">
129-
<arguments>
130-
<argument name="productDataProvider" xsi:type="object">
131-
Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Deferred\ChildProduct
132-
</argument>
133-
</arguments>
134-
</virtualType>
135117
</config>

app/code/Magento/BundleGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type BundleItemOption @doc(description: "Defines the characteristics that compri
6969
price: Float @doc(description: "The price of the selected option.")
7070
price_type: PriceTypeEnum @doc(description: "One of FIXED, PERCENT, or DYNAMIC.")
7171
can_change_quantity: Boolean @doc(description: "Indicates whether the customer can change the number of items for this option.")
72-
product: ProductInterface @doc(description: "Contains details about this product option.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Options\\Product")
72+
product: ProductInterface @doc(description: "Contains details about this product option.") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Product")
7373
uid: ID! @doc(description: "The unique ID for a `BundleItemOption` object.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Options\\BundleItemOptionUid")
7474
}
7575

app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public function validate($object)
5656
);
5757
}
5858

59+
if (strcasecmp($attrCode, 'sku') >= 0 && strlen($value) === 0) {
60+
throw new LocalizedException(
61+
__('The "%1" attribute value is empty.', $attrCode)
62+
);
63+
}
64+
5965
if ($this->string->strlen($object->getSku()) > self::SKU_MAX_LENGTH) {
6066
throw new LocalizedException(
6167
__('SKU length should be %1 characters maximum.', self::SKU_MAX_LENGTH)

app/code/Magento/Catalog/Model/ResourceModel/Product/ChildCollectionFactory.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

app/code/Magento/Catalog/Model/ResourceModel/Product/CollectionFactory.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ protected function _prepareMultiselectIndex($entityIds = null, $attributeId = nu
343343
$this->_addAttributeToSelect($select, 'status', "pvd.{$productIdField}", 'cs.store_id', $statusCond);
344344

345345
if ($entityIds !== null) {
346-
$select->where('cpe.entity_id IN(?)', $entityIds);
346+
$select->where('cpe.entity_id IN(?)', $entityIds, \Zend_Db::INT_TYPE);
347347
}
348348
/**
349349
* Add additional external limitation

app/code/Magento/Catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ public function execute(
6868
$regularPrice + $optionPrice,
6969
$product
7070
);
71-
$finalOptionPrice = $totalCatalogRulePrice - $catalogRulePrice;
72-
return $this->priceCurrency->convertAndRound($finalOptionPrice);
71+
return $totalCatalogRulePrice - $catalogRulePrice;
7372
}
7473

7574
return null;

app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="AdminAddImageToWYSIWYGCatalogTest">
11-
<before>
12-
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13-
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
14-
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" />
15-
</before>
1611
<annotations>
1712
<features value="Catalog"/>
1813
<stories value="MAGETWO-42041-Default WYSIWYG toolbar configuration with Magento Media Gallery"/>
@@ -22,6 +17,34 @@
2217
<severity value="CRITICAL"/>
2318
<testCaseId value="MAGETWO-84373"/>
2419
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
22+
<actionGroup ref="AdminMediaGalleryEnhancedEnableActionGroup" stepKey="enableOldMediaGallery">
23+
<argument name="enabled" value="0"/>
24+
</actionGroup>
25+
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
26+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" />
27+
</before>
28+
<after>
29+
<actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/>
30+
<actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder">
31+
<argument name="FolderName" value="Storage Root"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder">
34+
<argument name="FolderName" value="wysiwyg"/>
35+
</actionGroup>
36+
<actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder">
37+
<argument name="ImageFolder" value="ImageFolder"/>
38+
</actionGroup>
39+
<actionGroup ref="DeleteCategoryActionGroup" stepKey="DeleteCategory">
40+
<argument name="categoryEntity" value="SimpleSubCategory"/>
41+
</actionGroup>
42+
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
43+
<actionGroup ref="AdminMediaGalleryEnhancedEnableActionGroup" stepKey="disableOldMediaGallery">
44+
<argument name="enabled" value="1"/>
45+
</actionGroup>
46+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
47+
</after>
2548
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToNewCatalog"/>
2649
<comment userInput="BIC workaround" stepKey="wait2"/>
2750
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
@@ -57,22 +80,5 @@
5780
<waitForPageLoad stepKey="waitForPageLoad2"/>
5881
<seeElement selector="{{StorefrontCategoryMainSection.mediaDescription(ImageUpload3.content)}}" stepKey="assertMediaDescription"/>
5982
<seeElementInDOM selector="{{StorefrontCategoryMainSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource"/>
60-
<after>
61-
<actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/>
62-
<actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder">
63-
<argument name="FolderName" value="Storage Root"/>
64-
</actionGroup>
65-
<actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder">
66-
<argument name="FolderName" value="wysiwyg"/>
67-
</actionGroup>
68-
<actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder">
69-
<argument name="ImageFolder" value="ImageFolder"/>
70-
</actionGroup>
71-
<actionGroup ref="DeleteCategoryActionGroup" stepKey="DeleteCategory">
72-
<argument name="categoryEntity" value="SimpleSubCategory"/>
73-
</actionGroup>
74-
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
75-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
76-
</after>
7783
</test>
7884
</tests>

0 commit comments

Comments
 (0)