Skip to content

Commit

Permalink
Merge branch '2.4-develop' into improve-column-thumbnail-image-html
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka committed Aug 13, 2020
2 parents 3337da2 + cc6286a commit 8f75f1f
Show file tree
Hide file tree
Showing 4,579 changed files with 118,714 additions and 20,103 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For more detailed information on contribution please read our [beginners guide](
* Unit/integration test coverage
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
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.
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
5. All automated tests must pass.

## Contribution process

Expand Down
9 changes: 0 additions & 9 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,6 @@
Require all denied
</IfVersion>
</Files>
<Files .travis.yml>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files CHANGELOG.md>
<IfVersion < 2.4>
order allow,deny
Expand Down
9 changes: 0 additions & 9 deletions .htaccess.sample
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,6 @@
Require all denied
</IfVersion>
</Files>
<Files .travis.yml>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
<Files CHANGELOG.md>
<IfVersion < 2.4>
order allow,deny
Expand Down
814 changes: 814 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<p align="center">
<a href="https://magento.com">
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento" />
</a>
</p>
<p align="center">
<br /><br />
<a href="https://magento.com">
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento Commerce" />
</a>
<br />
<br />
<a href="https://www.codetriage.com/magento/magento2">
<img src="https://www.codetriage.com/magento/magento2/badges/users.svg" alt="Open Source Helpers" />
</a>
Expand Down

This file was deleted.

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->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 @@ -3,15 +3,25 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;

use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
use Magento\CatalogImportExport\Model\Import\Product;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractPrice;
use Magento\Customer\Api\GroupRepositoryInterface;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Exception\LocalizedException;

class TierPrice extends \Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractPrice
class TierPrice extends AbstractPrice
{
/**
* @var \Magento\CatalogImportExport\Model\Import\Product\StoreResolver
* @var StoreResolver
*/
protected $storeResolver;

Expand All @@ -27,21 +37,26 @@ class TierPrice extends \Magento\CatalogImportExport\Model\Import\Product\Valida
];

/**
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
* @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
* @param \Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
* @param GroupRepositoryInterface $groupRepository
* @param SearchCriteriaBuilder $searchCriteriaBuilder
* @param StoreResolver $storeResolver
*/
public function __construct(
\Magento\Customer\Api\GroupRepositoryInterface $groupRepository,
\Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
GroupRepositoryInterface $groupRepository,
SearchCriteriaBuilder $searchCriteriaBuilder,
StoreResolver $storeResolver
) {
$this->storeResolver = $storeResolver;
parent::__construct($groupRepository, $searchCriteriaBuilder);
}

/**
* {@inheritdoc}
* Initialize method
*
* @param Product $context
*
* @return RowValidatorInterface|AbstractImportValidator|void
* @throws LocalizedException
*/
public function init($context)
{
Expand All @@ -52,7 +67,10 @@ public function init($context)
}

/**
* Add decimal error
*
* @param string $attribute
*
* @return void
*/
protected function addDecimalError($attribute)
Expand Down Expand Up @@ -83,12 +101,12 @@ public function getCustomerGroups()
}

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* Validation
*
* @param mixed $value
* @return bool
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
public function isValid($value)
{
Expand Down Expand Up @@ -133,6 +151,7 @@ public function isValid($value)
* Check if at list one value and length are valid
*
* @param array $value
*
* @return bool
*/
protected function isValidValueAndLength(array $value)
Expand All @@ -150,6 +169,7 @@ protected function isValidValueAndLength(array $value)
* Check if value has empty columns
*
* @param array $value
*
* @return bool
*/
protected function hasEmptyColumns(array $value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,24 @@
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;

use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;

/**
* Class TierPriceType validates tier price type.
*/
class TierPriceType extends \Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator
class TierPriceType extends AbstractImportValidator
{
/**
* {@inheritdoc}
*/
public function init($context)
{
return parent::init($context);
}

/**
* Validate tier price type.
*
* @param array $value
*
* @return bool
*/
public function isValid($value)
Expand Down
Loading

0 comments on commit 8f75f1f

Please sign in to comment.