Skip to content

Commit 25422c2

Browse files
author
Gabriel da Gama
authored
Merge branch '2.4-develop' into 2.4-develop
2 parents 78a897b + 32ed03c commit 25422c2

File tree

654 files changed

+17374
-2978
lines changed

Some content is hidden

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

654 files changed

+17374
-2978
lines changed

.editorconfig

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

1111
[*.md]
1212
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml,json}]
15+
indent_size = 2
16+
17+
[{composer, auth}.json]
18+
indent_size = 4

.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/code/Magento/AdminNotification/Test/Mftf/Section/AdminSystemMessagesSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
<element name="success" type="text" selector="#system_messages div.message-success"/>
1616
<element name="warning" type="text" selector="#system_messages div.message-warning"/>
1717
<element name="notice" type="text" selector="#system_messages div.message-notice"/>
18+
<element name="info" type="text" selector="#system_messages div.message-info"/>
19+
<element name="viewDetailsLink" type="button" selector="//div[contains(@class, 'message-system-short')]/a[contains(text(), 'View Details')]" timeout="30"/>
1820
</section>
1921
</sections>

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/Analytics/Model/ReportUrlProvider.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ class ReportUrlProvider
4747
*/
4848
private $urlReportConfigPath = 'analytics/url/report';
4949

50+
/**
51+
* Path to Advanced Reporting documentation URL.
52+
*
53+
* @var string
54+
*/
55+
private $urlReportDocConfigPath = 'analytics/url/documentation';
56+
5057
/**
5158
* @param AnalyticsToken $analyticsToken
5259
* @param OTPRequest $otpRequest
@@ -80,13 +87,15 @@ public function getUrl()
8087
));
8188
}
8289

83-
$url = $this->config->getValue($this->urlReportConfigPath);
8490
if ($this->analyticsToken->isTokenExist()) {
91+
$url = $this->config->getValue($this->urlReportConfigPath);
8592
$otp = $this->otpRequest->call();
8693
if ($otp) {
8794
$query = http_build_query(['otp' => $otp], '', '&');
8895
$url .= '?' . $query;
8996
}
97+
} else {
98+
$url = $this->config->getValue($this->urlReportDocConfigPath);
9099
}
91100

92101
return $url;

app/code/Magento/Analytics/Test/Mftf/ActionGroup/AssertAdminAdvancedReportingPageUrlActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
<switchToNextTab stepKey="switchToNewTab"/>
1717
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
18-
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
18+
<seeInCurrentUrl url="reports/advanced-reporting" stepKey="seeAssertAdvancedReportingPageUrl"/>
1919
</actionGroup>
2020
</actionGroups>

app/code/Magento/Analytics/Test/Unit/Model/ReportUrlProviderTest.php

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,10 @@ class ReportUrlProviderTest extends TestCase
4343
*/
4444
private $flagManagerMock;
4545

46-
/**
47-
* @var ObjectManagerHelper
48-
*/
49-
private $objectManagerHelper;
50-
5146
/**
5247
* @var ReportUrlProvider
5348
*/
54-
private $reportUrlProvider;
55-
56-
/**
57-
* @var string
58-
*/
59-
private $urlReportConfigPath = 'path/url/report';
49+
private $model;
6050

6151
/**
6252
* @return void
@@ -71,35 +61,36 @@ protected function setUp(): void
7161

7262
$this->flagManagerMock = $this->createMock(FlagManager::class);
7363

74-
$this->objectManagerHelper = new ObjectManagerHelper($this);
64+
$objectManagerHelper = new ObjectManagerHelper($this);
7565

76-
$this->reportUrlProvider = $this->objectManagerHelper->getObject(
66+
$this->model = $objectManagerHelper->getObject(
7767
ReportUrlProvider::class,
7868
[
7969
'config' => $this->configMock,
8070
'analyticsToken' => $this->analyticsTokenMock,
8171
'otpRequest' => $this->otpRequestMock,
8272
'flagManager' => $this->flagManagerMock,
83-
'urlReportConfigPath' => $this->urlReportConfigPath,
8473
]
8574
);
8675
}
8776

8877
/**
8978
* @param bool $isTokenExist
9079
* @param string|null $otp If null OTP was not received.
80+
* @param string $configPath
81+
* @return void
9182
*
9283
* @dataProvider getUrlDataProvider
9384
*/
94-
public function testGetUrl($isTokenExist, $otp)
85+
public function testGetUrl(bool $isTokenExist, ?string $otp, string $configPath): void
9586
{
9687
$reportUrl = 'https://example.com/report';
9788
$url = '';
9889

9990
$this->configMock
10091
->expects($this->once())
10192
->method('getValue')
102-
->with($this->urlReportConfigPath)
93+
->with($configPath)
10394
->willReturn($reportUrl);
10495
$this->analyticsTokenMock
10596
->expects($this->once())
@@ -114,18 +105,19 @@ public function testGetUrl($isTokenExist, $otp)
114105
if ($isTokenExist && $otp) {
115106
$url = $reportUrl . '?' . http_build_query(['otp' => $otp], '', '&');
116107
}
117-
$this->assertSame($url ?: $reportUrl, $this->reportUrlProvider->getUrl());
108+
109+
$this->assertSame($url ?: $reportUrl, $this->model->getUrl());
118110
}
119111

120112
/**
121113
* @return array
122114
*/
123-
public function getUrlDataProvider()
115+
public function getUrlDataProvider(): array
124116
{
125117
return [
126-
'TokenDoesNotExist' => [false, null],
127-
'TokenExistAndOtpEmpty' => [true, null],
128-
'TokenExistAndOtpValid' => [true, '249e6b658877bde2a77bc4ab'],
118+
'TokenDoesNotExist' => [false, null, 'analytics/url/documentation'],
119+
'TokenExistAndOtpEmpty' => [true, null, 'analytics/url/report'],
120+
'TokenExistAndOtpValid' => [true, '249e6b658877bde2a77bc4ab', 'analytics/url/report'],
129121
];
130122
}
131123

@@ -140,6 +132,6 @@ public function testGetUrlWhenSubscriptionUpdateRunning()
140132
->with(SubscriptionUpdateHandler::PREVIOUS_BASE_URL_FLAG_CODE)
141133
->willReturn('http://store.com');
142134
$this->expectException(SubscriptionUpdateException::class);
143-
$this->reportUrlProvider->getUrl();
135+
$this->model->getUrl();
144136
}
145137
}

app/code/Magento/Analytics/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<otp>https://advancedreporting.rjmetrics.com/otp</otp>
1616
<report>https://advancedreporting.rjmetrics.com/report</report>
1717
<notify_data_changed>https://advancedreporting.rjmetrics.com/report</notify_data_changed>
18+
<documentation>https://docs.magento.com/user-guide/reports/advanced-reporting.html</documentation>
1819
</url>
1920
<integration_name>Magento Analytics user</integration_name>
2021
<general>

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
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminBulkDetailsModalSection">
12+
<element name="descriptionValue" type="text" selector="//aside//div[@data-index='description']//span[@name='description']"/>
13+
<element name="summaryValue" type="text" selector="//aside//div[@data-index='summary']//span[@name='summary']" />
14+
<element name="startTimeValue" type="text" selector="//aside//div[@data-index='start_time']//span[@name='start_time']" />
15+
</section>
16+
</sections>

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>

0 commit comments

Comments
 (0)