Skip to content

Commit 35bbc82

Browse files
Merge branch '2.4-develop' into patch-1
2 parents 78dd01a + 6cd35e9 commit 35bbc82

File tree

1,011 files changed

+28671
-4198
lines changed

Some content is hidden

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

1,011 files changed

+28671
-4198
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/AdminAnalytics/etc/csp_whitelist.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,24 @@
1313
<value id="adobedtm" type="host">assets.adobedtm.com</value>
1414
</values>
1515
</policy>
16+
<policy id="img-src">
17+
<values>
18+
<value id="adobedtm" type="host">assets.adobedtm.com</value>
19+
<value id="omtrdc" type="host">amcglobal.sc.omtrdc.net</value>
20+
<value id="dpmdemdex" type="host">dpm.demdex.net</value>
21+
<value id="everesttech" type="host">cm.everesttech.net</value>
22+
</values>
23+
</policy>
24+
<policy id="connect-src">
25+
<values>
26+
<value id="dpmdemdex" type="host">dpm.demdex.net</value>
27+
<value id="omtrdc" type="host">amcglobal.sc.omtrdc.net</value>
28+
</values>
29+
</policy>
30+
<policy id="frame-src">
31+
<values>
32+
<value id="amcdemdex" type="host">fast.amc.demdex.net</value>
33+
</values>
34+
</policy>
1635
</policies>
1736
</csp_whitelist>

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/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
1111

1212
/**
13-
* Class AdvancedPricing
13+
* Import advanced pricing class
1414
*
1515
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -19,43 +19,27 @@
1919
class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
2020
{
2121
const VALUE_ALL_GROUPS = 'ALL GROUPS';
22-
2322
const VALUE_ALL_WEBSITES = 'All Websites';
24-
2523
const COL_SKU = 'sku';
26-
2724
const COL_TIER_PRICE_WEBSITE = 'tier_price_website';
28-
2925
const COL_TIER_PRICE_CUSTOMER_GROUP = 'tier_price_customer_group';
30-
3126
const COL_TIER_PRICE_QTY = 'tier_price_qty';
32-
3327
const COL_TIER_PRICE = 'tier_price';
34-
3528
const COL_TIER_PRICE_PERCENTAGE_VALUE = 'percentage_value';
36-
3729
const COL_TIER_PRICE_TYPE = 'tier_price_value_type';
38-
3930
const TIER_PRICE_TYPE_FIXED = 'Fixed';
40-
4131
const TIER_PRICE_TYPE_PERCENT = 'Discount';
42-
4332
const TABLE_TIER_PRICE = 'catalog_product_entity_tier_price';
44-
4533
const DEFAULT_ALL_GROUPS_GROUPED_PRICE_VALUE = '0';
46-
4734
const ENTITY_TYPE_CODE = 'advanced_pricing';
48-
4935
const VALIDATOR_MAIN = 'validator';
50-
5136
const VALIDATOR_WEBSITE = 'validator_website';
5237

5338
/**
5439
* @deprecated
5540
* @see VALIDATOR_TIER_PRICE
5641
*/
5742
private const VALIDATOR_TEAR_PRICE = 'validator_tier_price';
58-
5943
private const VALIDATOR_TIER_PRICE = 'validator_tier_price';
6044

6145
/**
@@ -176,10 +160,8 @@ class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\Abstract
176160
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
177161
* @param \Magento\ImportExport\Helper\Data $importExportData
178162
* @param \Magento\ImportExport\Model\ResourceModel\Import\Data $importData
179-
* @param \Magento\Eav\Model\Config $config
180163
* @param \Magento\Framework\App\ResourceConnection $resource
181164
* @param \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper
182-
* @param \Magento\Framework\Stdlib\StringUtils $string
183165
* @param ProcessingErrorAggregatorInterface $errorAggregator
184166
* @param \Magento\Framework\Stdlib\DateTime\DateTime $dateTime
185167
* @param \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory $resourceFactory
@@ -197,10 +179,8 @@ public function __construct(
197179
\Magento\Framework\Json\Helper\Data $jsonHelper,
198180
\Magento\ImportExport\Helper\Data $importExportData,
199181
\Magento\ImportExport\Model\ResourceModel\Import\Data $importData,
200-
\Magento\Eav\Model\Config $config,
201182
\Magento\Framework\App\ResourceConnection $resource,
202183
\Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper,
203-
\Magento\Framework\Stdlib\StringUtils $string,
204184
ProcessingErrorAggregatorInterface $errorAggregator,
205185
\Magento\Framework\Stdlib\DateTime\DateTime $dateTime,
206186
\Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory $resourceFactory,

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as RowValidatorInterface;
1717
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
1818
use Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory as ResourceFactory;
19-
use Magento\Eav\Model\Config;
2019
use Magento\Eav\Model\Entity\Type;
2120
use Magento\Framework\App\ResourceConnection;
2221
use Magento\Framework\DB\Adapter\AdapterInterface;
@@ -26,7 +25,6 @@
2625
use Magento\Framework\Json\Helper\Data;
2726
use Magento\Framework\Stdlib\DateTime\DateTime;
2827
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
29-
use Magento\Framework\Stdlib\StringUtils;
3028
use Magento\ImportExport\Model\Import;
3129
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
3230
use Magento\ImportExport\Model\ResourceModel\Helper;
@@ -99,11 +97,6 @@ class AdvancedPricingTest extends AbstractImportTestCase
9997
*/
10098
protected $dataSourceModel;
10199

102-
/**
103-
* @var Config
104-
*/
105-
protected $eavConfig;
106-
107100
/**
108101
* @var TimezoneInterface|MockObject
109102
*/
@@ -139,11 +132,6 @@ class AdvancedPricingTest extends AbstractImportTestCase
139132
*/
140133
protected $advancedPricing;
141134

142-
/**
143-
* @var StringUtils
144-
*/
145-
protected $stringObject;
146-
147135
/**
148136
* @var ProcessingErrorAggregatorInterface
149137
*/
@@ -165,10 +153,8 @@ protected function setUp(): void
165153
);
166154
$this->resource->method('getConnection')->willReturn($this->connection);
167155
$this->dataSourceModel = $this->createMock(\Magento\ImportExport\Model\ResourceModel\Import\Data::class);
168-
$this->eavConfig = $this->createMock(Config::class);
169156
$entityType = $this->createMock(Type::class);
170157
$entityType->method('getEntityTypeId')->willReturn('');
171-
$this->eavConfig->method('getEntityType')->willReturn($entityType);
172158
$this->resourceFactory = $this->getMockBuilder(
173159
\Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory::class
174160
)
@@ -193,7 +179,6 @@ protected function setUp(): void
193179
$this->tierPriceValidator = $this->createMock(
194180
TierPrice::class
195181
);
196-
$this->stringObject = $this->createMock(StringUtils::class);
197182
$this->errorAggregator = $this->getErrorAggregatorObject();
198183
$this->dateTime = $this->getMockBuilder(DateTime::class)
199184
->disableOriginalConstructor()
@@ -1070,10 +1055,8 @@ private function getAdvancedPricingMock($methods = [])
10701055
$this->jsonHelper,
10711056
$this->importExportData,
10721057
$this->dataSourceModel,
1073-
$this->eavConfig,
10741058
$this->resource,
10751059
$this->resourceHelper,
1076-
$this->stringObject,
10771060
$this->errorAggregator,
10781061
$this->dateTime,
10791062
$this->resourceFactory,

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>

0 commit comments

Comments
 (0)