Skip to content

Commit 634d857

Browse files
Merge branch '2.4-develop' into fix_setup-upgrade_command_re-enables_caches
2 parents 36198f2 + 18da36b commit 634d857

File tree

4,912 files changed

+135998
-23070
lines changed

Some content is hidden

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

4,912 files changed

+135998
-23070
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/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
</policies>
17+
</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: 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+
<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="img-src">
12+
<values>
13+
<value id="commerce_widgets" type="host">widgets.magentocommerce.com</value>
14+
</values>
15+
</policy>
16+
</policies>
17+
</csp_whitelist>
18+

app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
/**
88
* @see \Magento\AdminNotification\Block\Window
9+
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
910
*/
1011
?>
1112
<ul class="message-system-list"
12-
style="display: none;"
1313
data-mage-init='{
1414
"Magento_Ui/js/modal/modal": {
1515
"autoOpen": true,
@@ -25,3 +25,4 @@
2525
</a>
2626
</li>
2727
</ul>
28+
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '.message-system-list'); ?>

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@
55
*/
66

77
/** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */
8+
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
89
?>
910

10-
<div style="display:none" id="system_messages_list" data-role="system_messages_list"
11+
<div id="system_messages_list" data-role="system_messages_list"
1112
title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
1213
<ul class="message-system-list messages">
13-
<?php foreach ($block->getUnreadMessages() as $message) : ?>
14+
<?php foreach ($block->getUnreadMessages() as $message): ?>
1415
<li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
1516
<?= $block->escapeHtml($message->getText()) ?>
1617
</li>
1718
<?php endforeach;?>
1819
</ul>
1920
</div>
21+
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#system_messages_list'); ?>
2022

2123
<script type="text/x-magento-init">
2224
{

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ private function prepareExportData(
381381
* @param array $exportData
382382
* @return array
383383
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
384-
* @deprecated
384+
* @deprecated 100.3.0
385385
* @see prepareExportData
386386
*/
387387
protected function correctExportData($exportData)
@@ -510,7 +510,7 @@ private function fetchTierPrices(array $productIds): array
510510
* @return array|bool
511511
* @SuppressWarnings(PHPMD.NPathComplexity)
512512
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
513-
* @deprecated
513+
* @deprecated 100.3.0
514514
* @see fetchTierPrices
515515
*/
516516
protected function getTierPrices(array $listSku, $table)

0 commit comments

Comments
 (0)