Skip to content

Commit 5021e2b

Browse files
committed
Merge branch '2.4-develop' into feature-backend-search-hotkey
2 parents d033021 + a1e5689 commit 5021e2b

File tree

760 files changed

+20206
-3250
lines changed

Some content is hidden

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

760 files changed

+20206
-3250
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/Block/ToolbarEntry.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
* Toolbar entry that shows latest notifications
1111
*
1212
* @api
13-
* @author Magento Core Team <[email protected]>
1413
* @since 100.0.2
1514
*/
1615
class ToolbarEntry extends \Magento\Backend\Block\Template

app/code/Magento/AdminNotification/Model/Feed.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
/**
1313
* AdminNotification Feed model
1414
*
15-
* @author Magento Core Team <[email protected]>
1615
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1716
* @api
1817
* @since 100.0.2

app/code/Magento/AdminNotification/Model/InboxInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
/**
99
* AdminNotification Inbox interface
1010
*
11-
* @author Magento Core Team <[email protected]>
1211
* @api
1312
* @since 100.0.2
1413
*/

app/code/Magento/AdminNotification/Model/NotificationService.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
/**
99
* Notification service model
1010
*
11-
* @author Magento Core Team <[email protected]>
1211
* @api
1312
* @since 100.0.2
1413
*/

app/code/Magento/AdminNotification/Model/ResourceModel/Grid/Collection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
/**
88
* AdminNotification Inbox model
9-
*
10-
* @author Magento Core Team <[email protected]>
119
*/
1210
namespace Magento\AdminNotification\Model\ResourceModel\Grid;
1311

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
* AdminNotification Inbox model
1010
*
1111
* @api
12-
* @author Magento Core Team <[email protected]>
13-
* @api
1412
* @since 100.0.2
1513
*/
1614
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection/Unread.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
/**
88
* Collection of unread notifications
9-
*
10-
* @author Magento Core Team <[email protected]>
119
*/
1210
namespace Magento\AdminNotification\Model\ResourceModel\Inbox\Collection;
1311

app/code/Magento/AdminNotification/Observer/PredispatchAdminActionControllerObserver.php

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

1010
/**
1111
* AdminNotification observer
12-
*
13-
* @author Magento Core Team <[email protected]>
12+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1413
*/
1514
class PredispatchAdminActionControllerObserver implements ObserverInterface
1615
{

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/AdvancedSearch/Block/Adminhtml/Search/Edit.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Search queries relations grid container
1010
*
1111
* @api
12-
* @author Magento Core Team <[email protected]>
1312
* @since 100.0.2
1413
*/
1514
class Edit extends \Magento\Backend\Block\Widget\Grid\Container

app/code/Magento/AdvancedSearch/Block/Adminhtml/Search/Grid.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Search query relations edit grid
1010
*
1111
* @api
12-
* @author Magento Core Team <[email protected]>
1312
* @since 100.0.2
1413
*/
1514
class Grid extends \Magento\Backend\Block\Widget\Grid

app/code/Magento/AdvancedSearch/Model/ResourceModel/Recommendations.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
/**
99
* Catalog search recommendations resource model
1010
*
11-
* @author Magento Core Team <[email protected]>
1211
* @api
1312
* @since 100.0.2
1413
*/

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>

0 commit comments

Comments
 (0)