Skip to content

Commit 6c41578

Browse files
Merge branch '2.4-develop' into fix_type_casting
2 parents 0118d48 + 390505a commit 6c41578

File tree

5,582 files changed

+160143
-26522
lines changed

Some content is hidden

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

5,582 files changed

+160143
-26522
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more detailed information on contribution please read our [beginners guide](
2323
* Unit/integration test coverage
2424
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
2525
4. For larger features or changes, please [open an issue](https://github.com/magento/magento2/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
26-
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
26+
5. All automated tests must pass.
2727

2828
## Contribution process
2929

.github/ISSUE_TEMPLATE/story.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: GraphQL Story
3+
about: User story for GraphQL project
4+
labels: 'Project: GraphQL'
5+
6+
---
7+
8+
*As a ___ I want to ___ so that ___.*
9+
10+
### AC
11+
* a
12+
* b
13+
### Approved Schema
14+
* a

.htaccess

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@
238238
Require all denied
239239
</IfVersion>
240240
</Files>
241-
<Files .travis.yml>
242-
<IfVersion < 2.4>
243-
order allow,deny
244-
deny from all
245-
</IfVersion>
246-
<IfVersion >= 2.4>
247-
Require all denied
248-
</IfVersion>
249-
</Files>
250241
<Files CHANGELOG.md>
251242
<IfVersion < 2.4>
252243
order allow,deny

.htaccess.sample

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@
238238
Require all denied
239239
</IfVersion>
240240
</Files>
241-
<Files .travis.yml>
242-
<IfVersion < 2.4>
243-
order allow,deny
244-
deny from all
245-
</IfVersion>
246-
<IfVersion >= 2.4>
247-
Require all denied
248-
</IfVersion>
249-
</Files>
250241
<Files CHANGELOG.md>
251242
<IfVersion < 2.4>
252243
order allow,deny

CHANGELOG.md

Lines changed: 814 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<p align="center">
2-
<a href="https://magento.com">
3-
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento" />
4-
</a>
5-
</p>
6-
<p align="center">
7-
<br /><br />
2+
<a href="https://magento.com">
3+
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento Commerce" />
4+
</a>
5+
<br />
6+
<br />
87
<a href="https://www.codetriage.com/magento/magento2">
98
<img src="https://www.codetriage.com/magento/magento2/badges/users.svg" alt="Open Source Helpers" />
109
</a>

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/Test/Mftf/Test/TrackingScriptTest.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
10+
<policies>
11+
<policy id="script-src">
12+
<values>
13+
<value id="adobedtm" type="host">assets.adobedtm.com</value>
14+
</values>
15+
</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>
35+
</policies>
36+
</csp_whitelist>

app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
8+
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
79
?>
810

9-
<script>
11+
<?php
12+
$isAnaliticsVisible = $block->getNotification()->isAnalyticsVisible() ? 1 : 0;
13+
$isReleaseVisible = $block->getNotification()->isReleaseVisible() ? 1 : 0;
14+
$scriptString = <<<script
1015
define('analyticsPopupConfig', function () {
1116
return {
12-
analyticsVisible: <?= $block->getNotification()->isAnalyticsVisible() ? 1 : 0; ?>,
13-
releaseVisible: <?= $block->getNotification()->isReleaseVisible() ? 1 : 0; ?>,
17+
analyticsVisible: {$isAnaliticsVisible},
18+
releaseVisible: {$isReleaseVisible},
1419
}
1520
});
16-
</script>
21+
script;
22+
?>
23+
24+
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>

app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,28 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
/**
8+
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
9+
*/
610
?>
711

8-
<script src="<?= $block->escapeUrl($block->getTrackingUrl()) ?>" async></script>
9-
<script>
12+
<?= /* @noEscape */ $secureRenderer->renderTag(
13+
'script',
14+
[
15+
'src' => $block->getTrackingUrl(),
16+
'async' => true,
17+
],
18+
'&nbsp;',
19+
false
20+
) ?>
21+
22+
<?php $scriptString = '
1023
var adminAnalyticsMetadata = {
11-
"version": "<?= $block->escapeJs($block->getMetadata()->getMagentoVersion()) ?>",
12-
"user": "<?= $block->escapeJs($block->getMetadata()->getCurrentUser()) ?>",
13-
"mode": "<?= $block->escapeJs($block->getMetadata()->getMode()) ?>"
24+
"version": "' . $block->escapeJs($block->getMetadata()->getMagentoVersion()) . '",
25+
"user": "' . $block->escapeJs($block->getMetadata()->getCurrentUser()) . '",
26+
"mode": "' . $block->escapeJs($block->getMetadata()->getMode()) . '"
1427
};
15-
</script>
28+
';
29+
?>
30+
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>

app/code/Magento/AdminNotification/Block/System/Messages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Messages extends Template
2626

2727
/**
2828
* @var JsonDataHelper
29-
* @deprecated
29+
* @deprecated 100.3.0
3030
*/
3131
protected $jsonHelper;
3232

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ListAction extends \Magento\Backend\App\AbstractAction
1717

1818
/**
1919
* @var \Magento\Framework\Json\Helper\Data
20-
* @deprecated
20+
* @deprecated 100.3.0
2121
*/
2222
protected $jsonHelper;
2323

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>

0 commit comments

Comments
 (0)