Skip to content

Commit f66bb66

Browse files
author
Michael Bottens
committed
Merge remote-tracking branch 'origin/2.4-develop' into bugfix/issue-30009
2 parents fc74196 + edfbc39 commit f66bb66

File tree

573 files changed

+14810
-2527
lines changed

Some content is hidden

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

573 files changed

+14810
-2527
lines changed

.github/stale.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 76
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 14
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- "Priority: P0"
16+
- "Priority: P1"
17+
- "Priority: P2"
18+
- "Progress: dev in progress"
19+
- "Progress: PR in progress"
20+
- "Progress: done"
21+
- "B2B: GraphQL"
22+
- "Progress: PR Created"
23+
- "PAP"
24+
- "Project: Login as Customer"
25+
- "Project: GraphQL"
26+
27+
# Set to true to ignore issues in a project (defaults to false)
28+
exemptProjects: false
29+
30+
# Set to true to ignore issues in a milestone (defaults to false)
31+
exemptMilestones: false
32+
33+
# Set to true to ignore issues with an assignee (defaults to false)
34+
exemptAssignees: false
35+
36+
# Label to use when marking as stale
37+
staleLabel: "stale issue"
38+
39+
# Comment to post when marking as stale. Set to `false` to disable
40+
markComment: >
41+
This issue has been automatically marked as stale because it has not had
42+
recent activity. It will be closed after 14 days if no further activity occurs. Thank you
43+
for your contributions.
44+
# Comment to post when removing the stale label.
45+
# unmarkComment: >
46+
# Your comment here.
47+
48+
# Comment to post when closing a stale Issue or Pull Request.
49+
# closeComment: >
50+
# Your comment here.
51+
52+
# Limit the number of actions per hour, from 1-30. Default is 30
53+
limitPerRun: 30
54+
55+
# Limit to only `issues` or `pulls`
56+
only: issues
57+
58+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
59+
# pulls:
60+
# daysUntilStale: 30
61+
# markComment: >
62+
# This pull request has been automatically marked as stale because it has not had
63+
# recent activity. It will be closed if no further activity occurs. Thank you
64+
# for your contributions.
65+
66+
# issues:
67+
# exemptLabels:
68+
# - confirmed

app/bootstrap.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
#ini_set('display_errors', 1);
1515

1616
/* PHP version validation */
17-
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70103) {
17+
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70300) {
1818
if (PHP_SAPI == 'cli') {
19-
echo 'Magento supports PHP 7.1.3 or later. ' .
20-
'Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html';
19+
echo 'Magento supports PHP 7.3.0 or later. ' .
20+
'Please read https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html';
2121
} else {
2222
echo <<<HTML
2323
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
24-
<p>Magento supports PHP 7.1.3 or later. Please read
25-
<a target="_blank" href="https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html">
24+
<p>Magento supports PHP 7.3.0 or later. Please read
25+
<a target="_blank" href="https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html">
2626
Magento System Requirements</a>.
2727
</div>
2828
HTML;

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ public function __construct(
158158
protected function initTypeModels()
159159
{
160160
$productTypes = $this->_exportConfig->getEntityTypes(CatalogProduct::ENTITY);
161+
$disabledAttrs = [];
162+
$indexValueAttributes = [];
161163
foreach ($productTypes as $productTypeName => $productTypeConfig) {
162164
if (!($model = $this->_typeFactory->create($productTypeConfig['model']))) {
163165
throw new \Magento\Framework\Exception\LocalizedException(
@@ -174,21 +176,19 @@ protected function initTypeModels()
174176
}
175177
if ($model->isSuitable()) {
176178
$this->_productTypeModels[$productTypeName] = $model;
177-
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
178-
$this->_disabledAttrs = array_merge($this->_disabledAttrs, $model->getDisabledAttrs());
179-
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
180-
$this->_indexValueAttributes = array_merge(
181-
$this->_indexValueAttributes,
182-
$model->getIndexValueAttributes()
183-
);
179+
$disabledAttrs[] = $model->getDisabledAttrs();
180+
$indexValueAttributes[] = $model->getIndexValueAttributes();
184181
}
185182
}
186183
if (!$this->_productTypeModels) {
187184
throw new \Magento\Framework\Exception\LocalizedException(
188185
__('There are no product types available for export')
189186
);
190187
}
191-
$this->_disabledAttrs = array_unique($this->_disabledAttrs);
188+
$this->_disabledAttrs = array_unique(array_merge([], $this->_disabledAttrs, ...$disabledAttrs));
189+
$this->_indexValueAttributes = array_unique(
190+
array_merge([], $this->_indexValueAttributes, ...$indexValueAttributes)
191+
);
192192
return $this;
193193
}
194194

@@ -518,6 +518,8 @@ protected function getTierPrices(array $listSku, $table)
518518
if (isset($this->_parameters[\Magento\ImportExport\Model\Export::FILTER_ELEMENT_GROUP])) {
519519
$exportFilter = $this->_parameters[\Magento\ImportExport\Model\Export::FILTER_ELEMENT_GROUP];
520520
}
521+
$selectFields = [];
522+
$exportData = false;
521523
if ($table == ImportAdvancedPricing::TABLE_TIER_PRICE) {
522524
$selectFields = [
523525
ImportAdvancedPricing::COL_SKU => 'cpe.sku',

app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function process(string $encodedMessage)
117117
$status = OperationInterface::STATUS_TYPE_COMPLETE;
118118
$errorCode = null;
119119
$messages = [];
120+
$entityParams = [];
120121
$topicName = $operation->getTopicName();
121122
$handlers = $this->configuration->getHandlers($topicName);
122123
try {
@@ -127,7 +128,7 @@ public function process(string $encodedMessage)
127128
$this->logger->error($e->getMessage());
128129
$status = OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED;
129130
$errorCode = $e->getCode();
130-
$messages[] = $e->getMessage();
131+
$messages[] = [$e->getMessage()];
131132
}
132133

133134
$outputData = null;
@@ -136,9 +137,7 @@ public function process(string $encodedMessage)
136137
$result = $this->executeHandler($callback, $entityParams);
137138
$status = $result['status'];
138139
$errorCode = $result['error_code'];
139-
// phpcs:disable Magento2.Performance.ForeachArrayMerge
140-
$messages = array_merge($messages, $result['messages']);
141-
// phpcs:enable Magento2.Performance.ForeachArrayMerge
140+
$messages[] = $result['messages'];
142141
$outputData = $result['output_data'];
143142
}
144143
}
@@ -157,7 +156,7 @@ public function process(string $encodedMessage)
157156
);
158157
$outputData = $this->jsonHelper->serialize($outputData);
159158
} catch (\Exception $e) {
160-
$messages[] = $e->getMessage();
159+
$messages[] = [$e->getMessage()];
161160
}
162161
}
163162

@@ -167,7 +166,7 @@ public function process(string $encodedMessage)
167166
$operation->getId(),
168167
$status,
169168
$errorCode,
170-
implode('; ', $messages),
169+
implode('; ', array_merge([], ...$messages)),
171170
$serializedData,
172171
$outputData
173172
);

app/code/Magento/AsynchronousOperations/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<table name="magento_operation" resource="default" engine="innodb" comment="Operation entity">
3535
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
3636
comment="Operation ID"/>
37-
<column xsi:type="int" name="operation_key" padding="10" unsigned="true" nullable="false"
37+
<column xsi:type="int" name="operation_key" padding="10" unsigned="true" nullable="true"
3838
comment="Operation Key"/>
3939
<column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
4040
<column xsi:type="varchar" name="topic_name" nullable="true" length="255"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminOpenConfigurationStoresPageActionGroup">
11+
<annotations>
12+
<description>Open configuration stores page.</description>
13+
</annotations>
14+
15+
<amOnPage url="{{AdminConfigurationStoresPage.url}}" stepKey="goToConfigurationStoresPage"/>
16+
<waitForPageLoad stepKey="waitPageLoad"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
10+
<page name="AdminConfigurationStoresPage" url="admin/system_config/edit/section/cms/" area="admin" module="Catalog">
11+
<section name="WYSIWYGOptionsSection"/>
12+
</page>
13+
</pages>

app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationStoresPage/ConfigurationStoresPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-->
88
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
10+
<!-- @deprecated New Page was introduced. Please use "AdminConfigurationStoresPage" -->
1011
<page name="ConfigurationStoresPage" url="admin/system_config/edit/section/cms/" area="admin" module="Catalog">
1112
<section name="WYSIWYGOptionsSection"/>
1213
</page>

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<!-- Reset admin order filter -->
3535
<comment userInput="Reset admin order filter" stepKey="resetAdminOrderFilter"/>
3636
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/>
37-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingOrderGrid"/>
3837
<magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/>
3938
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
4039
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
@@ -84,8 +83,7 @@
8483
<comment userInput="Create invoice" stepKey="createInvoice"/>
8584

8685
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
87-
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
88-
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
86+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/>
8987
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
9088
<see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="$150.00" stepKey="seeCorrectGrandTotal"/>
9189
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
2525
<argument name="tags" value="config"/>
2626
</actionGroup>
27+
<magentoCLI command="setup:static-content:deploy -f" stepKey="deployStaticContent"/>
2728
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2829
</before>
2930
<after>
3031
<magentoCLI command="config:set {{MinifyJavaScriptFilesDisableConfigData.path}} {{MinifyJavaScriptFilesDisableConfigData.value}}" stepKey="disableJsMinification"/>
3132
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3233
</after>
33-
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
3434
<waitForPageLoad stepKey="waitForPageLoadOnDashboard"/>
35+
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
3536
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="loggedInSuccessfully"/>
3637
<actionGroup ref="AssertAdminPageIsNot404ActionGroup" stepKey="dontSee404Page"/>
3738
</test>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,21 @@
3535

3636
<click selector="{{AdminMenuSection.stores}}" stepKey="clickStoresMenuOption1"/>
3737
<waitForLoadingMaskToDisappear stepKey="waitForStoresMenu1" />
38+
<waitForElementVisible selector="{{AdminMenuSection.configuration}}" stepKey="waitForConfigurationVisible1"/>
3839
<click selector="{{AdminMenuSection.configuration}}" stepKey="clickStoresConfigurationMenuOption1"/>
3940
<waitForPageLoad stepKey="waitForConfigurationPageLoad1"/>
4041
<seeCurrentUrlMatches regex="~\/admin\/system_config\/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
4142

4243
<click selector="{{AdminMenuSection.catalog}}" stepKey="clickCatalogMenuOption"/>
4344
<waitForLoadingMaskToDisappear stepKey="waitForCatalogMenu1" />
45+
<waitForElementVisible selector="{{AdminMenuSection.catalogProducts}}" stepKey="waitForCatalogProductsVisible"/>
4446
<click selector="{{AdminMenuSection.catalogProducts}}" stepKey="clickCatalogProductsMenuOption"/>
4547
<waitForPageLoad stepKey="waitForProductsPageLoad"/>
4648
<seeCurrentUrlMatches regex="~\/catalog\/product\/~" stepKey="seeCurrentUrlMatchesProductsPath"/>
4749

4850
<click selector="{{AdminMenuSection.stores}}" stepKey="clickStoresMenuOption2"/>
4951
<waitForLoadingMaskToDisappear stepKey="waitForStoresMenu2" />
52+
<waitForElementVisible selector="{{AdminMenuSection.configuration}}" stepKey="waitForConfigurationVisible2"/>
5053
<click selector="{{AdminMenuSection.configuration}}" stepKey="clickStoresConfigurationMenuOption2"/>
5154
<waitForPageLoad stepKey="waitForConfigurationPageLoad2"/>
5255
<seeCurrentUrlMatches regex="~\/admin\/system_config\/~" stepKey="seeCurrentUrlMatchesConfigPath2"/>

app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,52 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
7+
use Magento\Framework\Escaper;
8+
use Magento\Framework\View\Helper\SecureHtmlRenderer;
9+
10+
/**
11+
* @var SecureHtmlRenderer $secureRenderer
12+
* @var Escaper $escaper
13+
*/
814
?>
9-
<!-- <?php if ($block->getTitle()): ?>
10-
<h3><?= $block->escapeHtml($block->getTitle()) ?></h3>
11-
<?php endif ?> -->
1215
<?php if (!empty($tabs)): ?>
13-
<div id="<?= $block->escapeHtmlAttr($block->getId()) ?>">
16+
<?php $blockId = $block->getId() ?>
17+
<div id="<?= $escaper->escapeHtmlAttr($blockId) ?>" class="hidden">
1418
<ul class="tabs-horiz">
1519
<?php foreach ($tabs as $_tab): ?>
20+
<?php $tabId = $block->getTabId($_tab) ?>
1621
<?php $_tabClass = 'tab-item-link ' . $block->getTabClass($_tab) . ' ' .
1722
(preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
1823
<?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
1924
<?php $_tabHref = $block->getTabUrl($_tab) == '#' ?
20-
'#' . $block->getTabId($_tab) . '_content' :
25+
'#' . $tabId . '_content' :
2126
$block->getTabUrl($_tab) ?>
2227
<li>
23-
<a href="<?= $block->escapeUrl($_tabHref) ?>"
24-
id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
25-
title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>"
26-
class="<?= $block->escapeHtmlAttr($_tabClass) ?>"
27-
data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
28+
<a href="<?= $escaper->escapeUrl($_tabHref) ?>"
29+
id="<?= $escaper->escapeHtmlAttr($tabId) ?>"
30+
title="<?= $escaper->escapeHtmlAttr($block->getTabTitle($_tab)) ?>"
31+
class="<?= $escaper->escapeHtmlAttr($_tabClass) ?>"
32+
data-tab-type="<?= $escaper->escapeHtmlAttr($_tabType) ?>">
2833
<span>
2934
<span class="changed"
30-
title="<?= $block->escapeHtmlAttr(__('The information in this tab has been changed.')) ?>"></span>
35+
title="<?= $escaper->escapeHtmlAttr(__(
36+
'The information in this tab has been changed.'
37+
)) ?>"></span>
3138
<span class="error"
32-
title="<?= $block->escapeHtmlAttr(__(
39+
title="<?= $escaper->escapeHtmlAttr(__(
3340
'This tab contains invalid data. Please resolve this before saving.'
3441
)) ?>"></span>
3542
<span class="loader"
36-
title="<?= $block->escapeHtmlAttr(__('Loading...')) ?>"></span>
37-
<?= $block->escapeHtml($block->getTabLabel($_tab)) ?>
43+
title="<?= $escaper->escapeHtmlAttr(__('Loading...')) ?>"></span>
44+
<?= $escaper->escapeHtml($block->getTabLabel($_tab)) ?>
3845
</span>
3946
</a>
40-
<div id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>_content">
47+
<div id="<?= $escaper->escapeHtmlAttr($tabId) ?>_content">
4148
<?= /* @noEscape */ $block->getTabContent($_tab) ?>
4249
</div>
4350
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
4451
'display:none',
45-
'#' . $block->escapeJs($block->getTabId($_tab)) . '_content'
52+
'#' . $escaper->escapeJs($tabId) . '_content'
4653
); ?>
4754
</li>
4855
<?php endforeach; ?>
@@ -51,11 +58,12 @@
5158
<?php $scriptString = <<<script
5259
require(["jquery","mage/backend/tabs"], function($){
5360
$(function() {
54-
$('#{$block->getId()}').tabs({
55-
active: '{$block->getActiveTabId()}',
56-
destination: '#{$block->getDestElementId()}',
61+
$('#{$escaper->escapeJs($blockId)}').tabs({
62+
active: '{$escaper->escapeJs($block->getActiveTabId())}',
63+
destination: '#{$escaper->escapeJs($block->getDestElementId())}',
5764
shadowTabs: {$block->getAllShadowTabs()}
5865
});
66+
$('#{$escaper->escapeJs($blockId)}').removeClass('hidden');
5967
});
6068
});
6169
script;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686

8787
<!--Add another bundle option with 2 items-->
8888
<!--Go to bundle product creation page-->
89-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
90-
<waitForPageLoad stepKey="WaitForPageToLoad"/>
89+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
9190
<conditionalClick selector="{{AdminProductFiltersSection.filtersClear}}" dependentSelector="{{AdminProductFiltersSection.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
9291
<waitForPageLoad stepKey="WaitForClear"/>
9392
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">

0 commit comments

Comments
 (0)