Skip to content

Commit f7da23e

Browse files
authored
Merge branch '2.4-develop' into bugfix/wildcard-section-reload-broken
2 parents 2922c1c + bdde24b commit f7da23e

File tree

4,160 files changed

+101821
-17966
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,160 files changed

+101821
-17966
lines changed

.github/CONTRIBUTING.md

+1-1
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

.htaccess

-9
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

-9
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

+814
Large diffs are not rendered by default.

README.md

+5-6
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

+24-12
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));
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

+12-4
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

+21-6
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

+1-1
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

+1-1
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

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

+2-1
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

+4-2
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

+2-2
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)

app/code/Magento/AdvancedSearch/Model/Client/ClientResolver.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ClientResolver
2020
*
2121
* @var ScopeConfigInterface
2222
* @since 100.1.0
23-
* @deprecated since it is not used anymore
23+
* @deprecated 100.3.0 since it is not used anymore
2424
*/
2525
protected $scopeConfig;
2626

@@ -56,14 +56,14 @@ class ClientResolver
5656
*
5757
* @var string
5858
* @since 100.1.0
59-
* @deprecated since it is not used anymore
59+
* @deprecated 100.3.0 since it is not used anymore
6060
*/
6161
protected $path;
6262

6363
/**
6464
* Config Scope
6565
* @since 100.1.0
66-
* @deprecated since it is not used anymore
66+
* @deprecated 100.3.0 since it is not used anymore
6767
*/
6868
protected $scope;
6969

app/code/Magento/Analytics/Model/Connector/Http/ConverterInterface.php

+5
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,35 @@
99
* Represents converter interface for http request and response body.
1010
*
1111
* @api
12+
* @since 100.2.0
1213
*/
1314
interface ConverterInterface
1415
{
1516
/**
1617
* @param string $body
1718
*
1819
* @return array
20+
* @since 100.2.0
1921
*/
2022
public function fromBody($body);
2123

2224
/**
2325
* @param array $data
2426
*
2527
* @return string
28+
* @since 100.2.0
2629
*/
2730
public function toBody(array $data);
2831

2932
/**
3033
* @return string
34+
* @since 100.2.0
3135
*/
3236
public function getContentTypeHeader();
3337

3438
/**
3539
* @return string
40+
* @since 100.3.0
3641
*/
3742
public function getContentMediaType(): string;
3843
}

0 commit comments

Comments
 (0)