Skip to content

Commit

Permalink
Merge branch '2.4-develop' into issue-7213
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Kilo committed Jul 29, 2020
2 parents 97b235d + 89d3cda commit 16797c3
Show file tree
Hide file tree
Showing 2,302 changed files with 27,012 additions and 9,859 deletions.
814 changes: 814 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
<policies>
<policy id="script-src">
<values>
<value id="adobedtm" type="host">assets.adobedtm.com</value>
</values>
</policy>
</policies>
</csp_whitelist>
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>

<script>
<?php
$isAnaliticsVisible = $block->getNotification()->isAnalyticsVisible() ? 1 : 0;
$isReleaseVisible = $block->getNotification()->isReleaseVisible() ? 1 : 0;
$scriptString = <<<script
define('analyticsPopupConfig', function () {
return {
analyticsVisible: <?= $block->getNotification()->isAnalyticsVisible() ? 1 : 0; ?>,
releaseVisible: <?= $block->getNotification()->isReleaseVisible() ? 1 : 0; ?>,
analyticsVisible: {$isAnaliticsVisible},
releaseVisible: {$isReleaseVisible},
}
});
</script>
script;
?>

<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,28 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/**
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>

<script src="<?= $block->escapeUrl($block->getTrackingUrl()) ?>" async></script>
<script>
<?= /* @noEscape */ $secureRenderer->renderTag(
'script',
[
'src' => '"' . $block->escapeJs($block->getTrackingUrl()) .'"',
'async' => true,
],
'&nbsp;',
false
) ?>

<?php $scriptString = '
var adminAnalyticsMetadata = {
"version": "<?= $block->escapeJs($block->getMetadata()->getMagentoVersion()) ?>",
"user": "<?= $block->escapeJs($block->getMetadata()->getCurrentUser()) ?>",
"mode": "<?= $block->escapeJs($block->getMetadata()->getMode()) ?>"
"version": "' . $block->escapeJs($block->getMetadata()->getMagentoVersion()) . '",
"user": "' . $block->escapeJs($block->getMetadata()->getCurrentUser()) . '",
"mode": "' . $block->escapeJs($block->getMetadata()->getMode()) . '"
};
</script>
';
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Messages extends Template

/**
* @var JsonDataHelper
* @deprecated
* @deprecated 100.3.0
*/
protected $jsonHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ListAction extends \Magento\Backend\App\AbstractAction

/**
* @var \Magento\Framework\Json\Helper\Data
* @deprecated
* @deprecated 100.3.0
*/
protected $jsonHelper;

Expand Down
18 changes: 18 additions & 0 deletions app/code/Magento/AdminNotification/etc/csp_whitelist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
<policies>
<policy id="img-src">
<values>
<value id="commerce_widgets" type="host">widgets.magentocommerce.com</value>
</values>
</policy>
</policies>
</csp_whitelist>

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

/**
* @see \Magento\AdminNotification\Block\Window
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>
<ul class="message-system-list"
style="display: none;"
data-mage-init='{
"Magento_Ui/js/modal/modal": {
"autoOpen": true,
Expand All @@ -25,3 +25,4 @@
</a>
</li>
</ul>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '.message-system-list'); ?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
*/

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

<div style="display:none" id="system_messages_list" data-role="system_messages_list"
<div id="system_messages_list" data-role="system_messages_list"
title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
<ul class="message-system-list messages">
<?php foreach ($block->getUnreadMessages() as $message) : ?>
<?php foreach ($block->getUnreadMessages() as $message): ?>
<li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
<?= $block->escapeHtml($message->getText()) ?>
</li>
<?php endforeach;?>
</ul>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#system_messages_list'); ?>

<script type="text/x-magento-init">
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private function prepareExportData(
* @param array $exportData
* @return array
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
* @deprecated
* @deprecated 100.3.0
* @see prepareExportData
*/
protected function correctExportData($exportData)
Expand Down Expand Up @@ -510,7 +510,7 @@ private function fetchTierPrices(array $productIds): array
* @return array|bool
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @deprecated
* @deprecated 100.3.0
* @see fetchTierPrices
*/
protected function getTierPrices(array $listSku, $table)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ClientResolver
*
* @var ScopeConfigInterface
* @since 100.1.0
* @deprecated since it is not used anymore
* @deprecated 100.3.0 since it is not used anymore
*/
protected $scopeConfig;

Expand Down Expand Up @@ -56,14 +56,14 @@ class ClientResolver
*
* @var string
* @since 100.1.0
* @deprecated since it is not used anymore
* @deprecated 100.3.0 since it is not used anymore
*/
protected $path;

/**
* Config Scope
* @since 100.1.0
* @deprecated since it is not used anymore
* @deprecated 100.3.0 since it is not used anymore
*/
protected $scope;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,35 @@
* Represents converter interface for http request and response body.
*
* @api
* @since 100.2.0
*/
interface ConverterInterface
{
/**
* @param string $body
*
* @return array
* @since 100.2.0
*/
public function fromBody($body);

/**
* @param array $data
*
* @return string
* @since 100.2.0
*/
public function toBody(array $data);

/**
* @return string
* @since 100.2.0
*/
public function getContentTypeHeader();

/**
* @return string
* @since 100.3.0
*/
public function getContentMediaType(): string;
}
1 change: 0 additions & 1 deletion app/code/Magento/Analytics/ReportXml/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function getConfig()
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CollectionTimeLabelTest extends TestCase
protected function setUp(): void
{
$this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
->setMethods(['getComment'])
->setMethods(['getComment', 'getElementHtml'])
->disableOriginalConstructor()
->getMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function setUp(): void
$this->subscriptionStatusProviderMock = $this->createMock(SubscriptionStatusProvider::class);
$this->contextMock = $this->createMock(Context::class);
$this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
->setMethods(['getComment'])
->setMethods(['getComment', 'getElementHtml'])
->disableOriginalConstructor()
->getMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class VerticalTest extends TestCase
protected function setUp(): void
{
$this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
->setMethods(['getComment', 'getLabel', 'getHint'])
->setMethods(['getComment', 'getLabel', 'getHint', 'getElementHtml'])
->disableOriginalConstructor()
->getMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Bulk summary data with list of operations items short data.
*
* @api
* @since 100.2.3
*/
interface BulkStatusInterface extends \Magento\Framework\Bulk\BulkStatusInterface
{
Expand All @@ -23,6 +24,7 @@ interface BulkStatusInterface extends \Magento\Framework\Bulk\BulkStatusInterfac
* @param string $bulkUuid
* @return \Magento\AsynchronousOperations\Api\Data\DetailedBulkOperationsStatusInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @since 100.2.3
*/
public function getBulkDetailedStatus($bulkUuid);

Expand All @@ -32,6 +34,7 @@ public function getBulkDetailedStatus($bulkUuid);
* @param string $bulkUuid
* @return \Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
* @since 100.2.3
*/
public function getBulkShortStatus($bulkUuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Temporary data object to give response from webapi async router
*
* @api
* @since 100.2.3
*/
interface AsyncResponseInterface
{
Expand All @@ -24,6 +25,7 @@ interface AsyncResponseInterface
* Gets the bulk uuid.
*
* @return string Bulk Uuid.
* @since 100.2.3
*/
public function getBulkUuid();

Expand All @@ -32,13 +34,15 @@ public function getBulkUuid();
*
* @param string $bulkUuid
* @return $this
* @since 100.2.3
*/
public function setBulkUuid($bulkUuid);

/**
* Gets the list of request items with status data.
*
* @return \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[]
* @since 100.2.3
*/
public function getRequestItems();

Expand All @@ -47,26 +51,30 @@ public function getRequestItems();
*
* @param \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[] $requestItems
* @return $this
* @since 100.2.3
*/
public function setRequestItems($requestItems);

/**
* @param bool $isErrors
* @return $this
* @since 100.2.3
*/
public function setErrors($isErrors = false);

/**
* Is there errors during processing bulk
*
* @return boolean
* @since 100.2.3
*/
public function isErrors();

/**
* Retrieve existing extension attributes object.
*
* @return \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface|null
* @since 100.2.3
*/
public function getExtensionAttributes();

Expand All @@ -75,6 +83,7 @@ public function getExtensionAttributes();
*
* @param \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
* @return $this
* @since 100.2.3
*/
public function setExtensionAttributes(
\Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Bulk summary data with list of operations items summary data.
*
* @api
* @since 100.2.3
*/
interface BulkOperationsStatusInterface extends BulkSummaryInterface
{
Expand All @@ -24,6 +25,7 @@ interface BulkOperationsStatusInterface extends BulkSummaryInterface
* Retrieve list of operation with statuses (short data).
*
* @return \Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface[]
* @since 100.2.3
*/
public function getOperationsList();

Expand All @@ -32,6 +34,7 @@ public function getOperationsList();
*
* @param \Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface[] $operationStatusList
* @return $this
* @since 100.2.3
*/
public function setOperationsList($operationStatusList);
}
Loading

0 comments on commit 16797c3

Please sign in to comment.