Skip to content

Commit e9359f1

Browse files
authored
Merge branch '2.4-develop' into improve-indexer_reindex_all_invalid-cronjob
2 parents 07d4ac6 + 5977749 commit e9359f1

File tree

1,511 files changed

+47385
-7867
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,511 files changed

+47385
-7867
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/autoload.php

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,48 @@
55
* Copyright © Magento, Inc. All rights reserved.
66
* See COPYING.txt for license details.
77
*/
8+
declare(strict_types=1);
9+
810
use Magento\Framework\Autoload\AutoloaderRegistry;
911
use Magento\Framework\Autoload\ClassLoaderWrapper;
1012

1113
/**
1214
* Shortcut constant for the root directory
1315
*/
14-
define('BP', dirname(__DIR__));
16+
\define('BP', \dirname(__DIR__));
1517

16-
define('VENDOR_PATH', BP . '/app/etc/vendor_path.php');
18+
\define('VENDOR_PATH', BP . '/app/etc/vendor_path.php');
1719

18-
if (!file_exists(VENDOR_PATH)) {
20+
if (!\is_readable(VENDOR_PATH)) {
1921
throw new \Exception(
2022
'We can\'t read some files that are required to run the Magento application. '
2123
. 'This usually means file permissions are set incorrectly.'
2224
);
2325
}
2426

25-
$vendorDir = require VENDOR_PATH;
26-
$vendorAutoload = BP . "/{$vendorDir}/autoload.php";
27+
$vendorAutoload = (
28+
static function (): ?string {
29+
$vendorDir = require VENDOR_PATH;
30+
31+
$vendorAutoload = BP . "/{$vendorDir}/autoload.php";
32+
if (\is_readable($vendorAutoload)) {
33+
return $vendorAutoload;
34+
}
35+
36+
$vendorAutoload = "{$vendorDir}/autoload.php";
37+
if (\is_readable($vendorAutoload)) {
38+
return $vendorAutoload;
39+
}
40+
41+
return null;
42+
}
43+
)();
2744

28-
/* 'composer install' validation */
29-
if (file_exists($vendorAutoload)) {
30-
$composerAutoloader = include $vendorAutoload;
31-
} else if (file_exists("{$vendorDir}/autoload.php")) {
32-
$vendorAutoload = "{$vendorDir}/autoload.php";
33-
$composerAutoloader = include $vendorAutoload;
34-
} else {
45+
if ($vendorAutoload === null) {
3546
throw new \Exception(
3647
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'
3748
);
3849
}
3950

51+
$composerAutoloader = include $vendorAutoload;
4052
AutoloaderRegistry::registerAutoloader(new ClassLoaderWrapper($composerAutoloader));

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;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckAnalyticsTrackingTest">
12+
<annotations>
13+
<stories value="AdminAnalytics Check Tracking."/>
14+
<title value="AdminAnalytics Check Tracking."/>
15+
<description value="AdminAnalytics Check Tracking."/>
16+
<severity value="MINOR"/>
17+
<testCaseId value="MC-36869"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
21+
<magentoCLI command="config:set admin/usage/enabled 1" stepKey="enableAdminUsageTracking"/>
22+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
23+
<argument name="tags" value="config full_page"/>
24+
</actionGroup>
25+
<reloadPage stepKey="pageReload"/>
26+
</before>
27+
<after>
28+
<magentoCLI command="config:set admin/usage/enabled 0" stepKey="disableAdminUsageTracking"/>
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
30+
</after>
31+
32+
<waitForPageLoad stepKey="waitForPageReloaded"/>
33+
<seeInPageSource html="var adminAnalyticsMetadata =" stepKey="seeInPageSource"/>
34+
</test>
35+
</tests>

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>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminNotificationToolbarSection">
12+
<element name="notification" type="block" selector=".notifications-wrapper.admin__action-dropdown-wrap"/>
13+
<element name="notificationCounter" type="block" selector=".notifications-action.admin__action-dropdown .notifications-counter"/>
14+
</section>
15+
</sections>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminSystemNotificationToolbarBlockAclTest">
12+
<annotations>
13+
<features value="AdminNotification"/>
14+
<stories value="Acl notification toolbar"/>
15+
<title value="Admin system notification toolbar block acl test"/>
16+
<description value="Admin should not see system notification toolbar block if acl not restricted"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-36011"/>
19+
<group value="menu"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
23+
24+
<actionGroup ref="AdminFillUserRoleRequiredDataActionGroup" stepKey="fillUserRoleRequiredData">
25+
<argument name="User" value="adminRole"/>
26+
<argument name="restrictedRole" value="Stores"/>
27+
</actionGroup>
28+
<actionGroup ref="AdminUserClickRoleResourceTabActionGroup" stepKey="goToRoleResourcesTab" />
29+
<actionGroup ref="AdminAddRestrictedRoleActionGroup" stepKey="addRestrictedRoleStores">
30+
<argument name="User" value="adminRole"/>
31+
<argument name="restrictedRole" value="Products"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminUserSaveRoleActionGroup" stepKey="saveUserRole" />
34+
35+
<actionGroup ref="AdminCreateUserActionGroup" stepKey="createAdminUser">
36+
<argument name="role" value="adminRole"/>
37+
<argument name="User" value="admin2"/>
38+
</actionGroup>
39+
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
41+
</before>
42+
<after>
43+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/>
44+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
45+
<!--Delete created data-->
46+
<actionGroup ref="AdminUserOpenAdminRolesPageActionGroup" stepKey="navigateToUserRoleGrid"/>
47+
<actionGroup ref="AdminDeleteRoleActionGroup" stepKey="deleteUserRole">
48+
<argument name="role" value="adminRole"/>
49+
</actionGroup>
50+
<actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="goToAllUsersPage"/>
51+
<actionGroup ref="AdminDeleteNewUserActionGroup" stepKey="deleteUser">
52+
<argument name="userName" value="{{admin2.username}}"/>
53+
</actionGroup>
54+
</after>
55+
56+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsNewUser">
57+
<argument name="username" value="{{admin2.username}}"/>
58+
<argument name="password" value="{{admin2.password}}"/>
59+
</actionGroup>
60+
61+
<waitForPageLoad stepKey="waitBeforePageLoad"/>
62+
<dontSeeElement selector="{{AdminNotificationToolbarSection.notification}}" stepKey="doNotSeeNotificationBellIcon"/>
63+
</test>
64+
</tests>

app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
template="Magento_AdminNotification::notification/window.phtml"/>
2121
</referenceContainer>
2222
<referenceContainer name="header">
23-
<block class="Magento\AdminNotification\Block\ToolbarEntry" name="notification.messages" before="user" template="Magento_AdminNotification::toolbar_entry.phtml"/>
23+
<block class="Magento\AdminNotification\Block\ToolbarEntry"
24+
name="notification.messages"
25+
before="user"
26+
aclResource="Magento_AdminNotification::show_toolbar"
27+
template="Magento_AdminNotification::toolbar_entry.phtml"/>
2428
</referenceContainer>
2529
</body>
2630
</page>

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,

0 commit comments

Comments
 (0)