Skip to content

Commit ea532db

Browse files
merge magento/2.4-develop into magento-tsg/2.4-develop-pr39
2 parents c2dff95 + 6b3b90b commit ea532db

File tree

3,453 files changed

+4271
-224927
lines changed

Some content is hidden

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

3,453 files changed

+4271
-224927
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.
1111

1212
### Preconditions (*)
1313
<!---
14-
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
14+
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
1515
-->
1616
1.
1717
2.
@@ -32,3 +32,12 @@ Important: Provide a set of clear steps to reproduce this bug. We can not provid
3232
<!--- Tell us what happened instead. Include error messages and issues. -->
3333
1. [Screenshots, logs or description]
3434
2.
35+
36+
---
37+
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
38+
39+
- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
40+
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
41+
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
42+
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
43+
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._

.github/ISSUE_TEMPLATE/developer-experience-issue.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ Fields marked with (*) are required. Please don't remove the template.
1818

1919
### Proposed solution
2020
<!--- Suggest your potential solutions for this issue. -->
21+
22+
---
23+
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
24+
25+
- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users with no workaround._
26+
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
27+
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
28+
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
29+
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
2424
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2525
-->
26-
1. magento/magento2#<issue_number>: Issue title
26+
1. Fixes magento/magento2#<issue_number>
2727

2828
### Manual testing scenarios (*)
2929
<!---

.php_cs.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
$finder = PhpCsFixer\Finder::create()
1212
->name('*.phtml')
13-
->exclude('dev/tests/functional/generated')
14-
->exclude('dev/tests/functional/var')
15-
->exclude('dev/tests/functional/vendor')
1613
->exclude('dev/tests/integration/tmp')
1714
->exclude('dev/tests/integration/var')
1815
->exclude('lib/internal/Cm')

app/code/Magento/Analytics/Controller/Adminhtml/Reports/Show.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Show extends Action implements HttpGetActionInterface
2727
/**
2828
* @inheritdoc
2929
*/
30-
const ADMIN_RESOURCE = 'Magento_Analytics::analytics_settings';
30+
const ADMIN_RESOURCE = 'Magento_Analytics::advanced_reporting';
3131

3232
/**
3333
* @param Context $context
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CliCacheCleanActionGroup">
12+
<annotations>
13+
<description>Run cache:clean by CLI with specified cache tags (space separated).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tags" type="string"/>
17+
</arguments>
18+
19+
<magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CliCacheFlushActionGroup">
12+
<annotations>
13+
<description>Run cache:flush by CLI with specified cache tags (space separated).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tags" type="string"/>
17+
</arguments>
18+
19+
<magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Test/AdminLoginSuccessfulTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<group value="login"/>
2121
</annotations>
2222

23+
2324
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2425
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/>
2526
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
</group>
342342
<group id="upload_configuration" translate="label" type="text" sortOrder="1000" showInDefault="1" showInWebsite="1" showInStore="1">
343343
<label>Images Upload Configuration</label>
344-
<field id="enable_resize" translate="label" type="select" sortOrder="200" showInDefault="1" canRestore="1">
344+
<field id="enable_resize" translate="label comment" type="select" sortOrder="200" showInDefault="1" canRestore="1">
345345
<label>Enable Frontend Resize</label>
346346
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
347347
<comment>Resize performed via javascript before file upload.</comment>
@@ -459,9 +459,7 @@
459459
<label>Add Store Code to Urls</label>
460460
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
461461
<backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
462-
<comment>
463-
<![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
464-
</comment>
462+
<comment><![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]></comment>
465463
</field>
466464
<field id="redirect_to_base" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
467465
<label>Auto-redirect to Base URL</label>

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,9 @@ Security,Security
403403
Web,Web
404404
"Url Options","Url Options"
405405
"Add Store Code to Urls","Add Store Code to Urls"
406-
"
407-
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
408-
","
409-
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
410-
"
406+
"<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).","<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.)."
407+
"Enable Frontend Resize","Enable Frontend Resize"
408+
"Resize performed via javascript before file upload.","Resize performed via javascript before file upload."
411409
"Auto-redirect to Base URL","Auto-redirect to Base URL"
412410
"Search Engine Optimization","Search Engine Optimization"
413411
"Use Web Server Rewrites","Use Web Server Rewrites"

app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
* @param string $value
5252
* @param int $length
5353
* @param string $etc
54-
* @param string &$remainder
54+
* @param string $remainder
5555
* @param bool $breakWords
5656
* @return string
5757
*/
@@ -83,6 +83,7 @@ public function getChildren($item)
8383
}
8484

8585
if ($items) {
86+
$itemsArray[$item->getOrderItem()->getId()][$item->getOrderItemId()] = $item;
8687
foreach ($items as $value) {
8788
$parentItem = $value->getOrderItem()->getParentItem();
8889
if ($parentItem) {

app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<requiredEntity createDataKey="createBundleOption"/>
3535
<requiredEntity createDataKey="createSimpleProduct"/>
3636
</createData>
37-
<magentoCron stepKey="runCronIndex" groups="index"/>
37+
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
3838
</before>
3939
<after>
4040
<!-- Delete Simple Product -->
@@ -56,9 +56,11 @@
5656
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
5757
<argument name="product" value="UpdateAttributeNameAndDescription"/>
5858
</actionGroup>
59-
<!--Run cron twice-->
60-
<magentoCLI command="cron:run" stepKey="cronRun"/>
61-
<magentoCLI command="cron:run" stepKey="cronRunTwice"/>
59+
<!-- Start message queue for product attribute consumer -->
60+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
61+
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
62+
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
63+
</actionGroup>
6264
<!-- Search for a product with a new name and Open Product -->
6365
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchWithNewProductName">
6466
<argument name="product" value="UpdateAttributeNameAndDescription"/>

app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use PHPUnit\Framework\MockObject\MockObject;
1818
use PHPUnit\Framework\TestCase;
1919

20+
/**
21+
* Test Renderer order item
22+
*/
2023
class RendererTest extends TestCase
2124
{
2225
/** @var Item|MockObject */
@@ -98,25 +101,27 @@ public function testGetChildren($parentItem)
98101
$parentItem = $this->createPartialMock(Item::class, ['getId', '__wakeup']);
99102
$parentItem->expects($this->any())->method('getId')->willReturn(1);
100103
}
101-
$this->orderItem->expects($this->any())->method('getOrderItem')->willReturnSelf();
102-
$this->orderItem->expects($this->any())->method('getParentItem')->willReturn($parentItem);
103-
$this->orderItem->expects($this->any())->method('getOrderItemId')->willReturn(2);
104-
$this->orderItem->expects($this->any())->method('getId')->willReturn(1);
104+
$this->orderItem->method('getOrderItem')->willReturnSelf();
105+
$this->orderItem->method('getParentItem')->willReturn($parentItem);
106+
$this->orderItem->method('getOrderItemId')->willReturn(2);
107+
$this->orderItem->method('getId')->willReturn(1);
105108

106109
$salesModel = $this->createPartialMock(
107110
Invoice::class,
108111
['getAllItems', '__wakeup']
109112
);
110-
$salesModel->expects($this->once())->method('getAllItems')->willReturn([$this->orderItem]);
113+
$salesModel->method('getAllItems')->willReturn([$this->orderItem]);
111114

112115
$item = $this->createPartialMock(
113116
\Magento\Sales\Model\Order\Invoice\Item::class,
114-
['getInvoice', 'getOrderItem', '__wakeup']
117+
['getInvoice', 'getOrderItem', 'getOrderItemId', '__wakeup']
115118
);
116-
$item->expects($this->once())->method('getInvoice')->willReturn($salesModel);
117-
$item->expects($this->any())->method('getOrderItem')->willReturn($this->orderItem);
119+
$item->method('getInvoice')->willReturn($salesModel);
120+
$item->method('getOrderItem')->willReturn($this->orderItem);
121+
$item->method('getOrderItemId')->willReturn($this->orderItem->getOrderItemId());
118122

119-
$this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
123+
$orderItem = $this->model->getChildren($item);
124+
$this->assertSame([2 => $this->orderItem], $orderItem);
120125
}
121126

122127
/**

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,6 @@ protected function _saveCategoryProducts($category)
469469

470470
if (!empty($insert) || !empty($delete)) {
471471
$productIds = array_unique(array_merge(array_keys($insert), array_keys($delete)));
472-
$this->_eventManager->dispatch(
473-
'catalog_category_change_products',
474-
['category' => $category, 'product_ids' => $productIds]
475-
);
476472

477473
$category->setChangedProductIds($productIds);
478474
}
@@ -484,6 +480,10 @@ protected function _saveCategoryProducts($category)
484480
* Setting affected products to category for third party engine index refresh
485481
*/
486482
$productIds = array_keys($insert + $delete + $update);
483+
$this->_eventManager->dispatch(
484+
'catalog_category_change_products',
485+
['category' => $category, 'product_ids' => $productIds]
486+
);
487487
$category->setAffectedProductIds($productIds);
488488
}
489489
return $this;
@@ -1078,7 +1078,6 @@ public function countVisible()
10781078
*/
10791079
public function load($object, $entityId, $attributes = [])
10801080
{
1081-
$this->_attributes = [];
10821081
$select = $this->_getLoadRowSelect($object, $entityId);
10831082
$row = $this->getConnection()->fetchRow($select);
10841083

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCreateSimpleProductActionGroup">
12+
<annotations>
13+
<description>Goes to the Admin Product grid page. Clicks on Add. Fills the provided Product details (Name, SKU, Price, Quantity, Category and URL). Clicks on Save. Validates that the Product details are present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="category"/>
17+
<argument name="simpleProduct"/>
18+
</arguments>
19+
20+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
21+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
22+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
23+
<fillField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>
24+
<fillField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
25+
<fillField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
26+
<fillField userInput="{{simpleProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
27+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{category.name}}]" stepKey="searchAndSelectCategory"/>
28+
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
29+
<fillField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>
30+
31+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
32+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
33+
<seeInField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="assertFieldName"/>
34+
<seeInField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="assertFieldSku"/>
35+
<seeInField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="assertFieldPrice"/>
36+
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSectionAssert"/>
37+
<seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/>
38+
</actionGroup>
39+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/DeleteProductActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<waitForPageLoad stepKey="waitForCatalogSubmenu" time="5"/>
2121
<click stepKey="clickOnProducts" selector="{{CatalogSubmenuSection.products}}"/>
2222
<waitForPageLoad stepKey="waitForProductsPage" time="10"/>
23+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
2324
<click stepKey="TickCheckbox" selector="{{ProductsPageSection.checkboxForProduct(productName)}}"/>
25+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
2426
<click stepKey="OpenActions" selector="{{ProductsPageSection.actions}}"/>
2527
<waitForAjaxLoad stepKey="waitForDelete" time="5"/>
2628
<click stepKey="ChooseDelete" selector="{{ProductsPageSection.delete}}"/>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminProductAttributeUpdateConsumerData">
12+
<data key="consumerName">product_action_attribute.update</data>
13+
<data key="messageLimit">100</data>
14+
</entity>
15+
<entity name="AdminProductAttributeWebsiteUpdateConsumerData">
16+
<data key="consumerName">product_action_attribute.website.update</data>
17+
<data key="messageLimit">100</data>
18+
</entity>
19+
</entities>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
<!--Open Index Management Page and Select Index mode "Update by Schedule" -->
3939
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
4040
<!-- Run cron twice -->
41-
<magentoCLI command="cron:run" stepKey="runCron1"/>
42-
<magentoCLI command="cron:run" stepKey="runCron2"/>
41+
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
42+
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
4343
</before>
4444
<after>
4545
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
<!--Open Index Management Page and Select Index mode "Update by Schedule" -->
3939
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
4040
<!-- Run cron twice -->
41-
<magentoCLI command="cron:run" stepKey="runCron1"/>
42-
<magentoCLI command="cron:run" stepKey="runCron2"/>
41+
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
42+
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
4343
</before>
4444
<after>
4545
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>

0 commit comments

Comments
 (0)