Skip to content

Commit

Permalink
Merge pull request magento#4512 from magento-trigger/MC-15776
Browse files Browse the repository at this point in the history
[trigger] MC-15776: Merge release branch into 2.3-develop
  • Loading branch information
irenelagno authored Jul 23, 2019
2 parents 777b0b0 + 1ad6fd2 commit 7ffabd0
Show file tree
Hide file tree
Showing 474 changed files with 11,577 additions and 5,283 deletions.
612 changes: 612 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 1 addition & 11 deletions app/code/Magento/Authorization/Model/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Role extends \Magento\Framework\Model\AbstractModel
* @param \Magento\Authorization\Model\ResourceModel\Role\Collection $resourceCollection
* @param array $data
*/
public function __construct(
public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Authorization\Model\ResourceModel\Role $resource,
Expand All @@ -52,28 +52,18 @@ public function __construct(

/**
* @inheritDoc
*
* @SuppressWarnings(PHPMD.SerializationAware)
* @deprecated Do not use PHP serialization.
*/
public function __sleep()
{
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);

$properties = parent::__sleep();
return array_diff($properties, ['_resource', '_resourceCollection']);
}

/**
* @inheritDoc
*
* @SuppressWarnings(PHPMD.SerializationAware)
* @deprecated Do not use PHP serialization.
*/
public function __wakeup()
{
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);

parent::__wakeup();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$this->_resource = $objectManager->get(\Magento\Authorization\Model\ResourceModel\Role::class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontVerifySecureURLRedirectAuthorizenet">
<annotations>
<features value="Authorizenet"/>
<stories value="Storefront Secure URLs"/>
<title value="Verify Secure URLs For Storefront Authorizenet Pages"/>
<description value="Verify that the Secure URL configuration applies to the Authorizenet pages on the Storefront"/>
<severity value="MAJOR"/>
<testCaseId value="MC-15610"/>
<group value="authorizenet"/>
<group value="configuration"/>
<group value="secure_storefront_url"/>
</annotations>
<before>
<createData entity="Simple_US_Customer" stepKey="customer"/>
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
<argument name="Customer" value="$$customer$$"/>
</actionGroup>
<executeJS function="return window.location.host" stepKey="hostname"/>
<magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
<magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
</before>
<after>
<magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
</after>
<executeJS function="return window.location.host" stepKey="hostname"/>
<amOnUrl url="http://{$hostname}/authorizenet" stepKey="goToUnsecureAuthorizenetURL"/>
<seeCurrentUrlEquals url="https://{$hostname}/authorizenet" stepKey="seeSecureAuthorizenetURL"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ define([
], function (AuthorizenetAcceptjs, $) {
'use strict';

return function (data, element) {
var $form = $(element),
config = data.config;
return function (config, element) {
var $form = $(element);

config.active = $form.length > 0 && !$form.is(':hidden');
new AuthorizenetAcceptjs(config);
Expand Down
13 changes: 9 additions & 4 deletions app/code/Magento/Backend/Block/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
namespace Magento\Backend\Block;

use Magento\Framework\Cache\LockGuardedCacheLoader;

/**
* Constructor modification point for Magento\Backend\Block\AbstractBlock.
*
Expand All @@ -17,7 +19,7 @@
* the classes they were introduced for.
*
* @api
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD)
* @since 100.0.2
*/
class Context extends \Magento\Framework\View\Element\Context
Expand All @@ -44,8 +46,9 @@ class Context extends \Magento\Framework\View\Element\Context
* @param \Magento\Framework\Escaper $escaper
* @param \Magento\Framework\Filter\FilterManager $filterManager
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\AuthorizationInterface $authorization
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
* @param \Magento\Framework\AuthorizationInterface $authorization
* @param LockGuardedCacheLoader|null $lockQuery
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
Expand All @@ -67,7 +70,8 @@ public function __construct(
\Magento\Framework\Filter\FilterManager $filterManager,
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
\Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
\Magento\Framework\AuthorizationInterface $authorization
\Magento\Framework\AuthorizationInterface $authorization,
LockGuardedCacheLoader $lockQuery = null
) {
$this->_authorization = $authorization;
parent::__construct(
Expand All @@ -87,7 +91,8 @@ public function __construct(
$escaper,
$filterManager,
$localeDate,
$inlineTranslation
$inlineTranslation,
$lockQuery
);
}

Expand Down
21 changes: 19 additions & 2 deletions app/code/Magento/Backend/Block/System/Design/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Backend\Block\System\Design;

/**
* Edit store design schedule block.
*/
class Edit extends \Magento\Backend\Block\Widget
{
/**
Expand All @@ -20,6 +23,8 @@ class Edit extends \Magento\Backend\Block\Widget
protected $_coreRegistry = null;

/**
* @inheritdoc
*
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param array $data
Expand All @@ -34,6 +39,8 @@ public function __construct(
}

/**
* @inheritdoc
*
* @return void
*/
protected function _construct()
Expand All @@ -44,7 +51,7 @@ protected function _construct()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
protected function _prepareLayout()
{
Expand All @@ -66,7 +73,7 @@ protected function _prepareLayout()
'label' => __('Delete'),
'onclick' => 'deleteConfirm(\'' . __(
'Are you sure?'
) . '\', \'' . $this->getDeleteUrl() . '\')',
) . '\', \'' . $this->getDeleteUrl() . '\', {data: {}})',
'class' => 'delete'
]
);
Expand All @@ -88,6 +95,8 @@ protected function _prepareLayout()
}

/**
* Return design change Id.
*
* @return string
*/
public function getDesignChangeId()
Expand All @@ -96,6 +105,8 @@ public function getDesignChangeId()
}

/**
* Return delete url.
*
* @return string
*/
public function getDeleteUrl()
Expand All @@ -104,6 +115,8 @@ public function getDeleteUrl()
}

/**
* Return save url for edit form.
*
* @return string
*/
public function getSaveUrl()
Expand All @@ -112,6 +125,8 @@ public function getSaveUrl()
}

/**
* Return validation url for edit form.
*
* @return string
*/
public function getValidationUrl()
Expand All @@ -120,6 +135,8 @@ public function getValidationUrl()
}

/**
* Return page header.
*
* @return string
*/
public function getHeader()
Expand Down
9 changes: 7 additions & 2 deletions app/code/Magento/Backend/Block/Template/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
namespace Magento\Backend\Block\Template;

use Magento\Framework\Cache\LockGuardedCacheLoader;

/**
* Constructor modification point for Magento\Backend\Block\Template.
*
Expand Down Expand Up @@ -85,6 +87,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
* @param \Magento\Framework\Math\Random $mathRandom
* @param \Magento\Framework\Data\Form\FormKey $formKey
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
* @param LockGuardedCacheLoader|null $lockQuery
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
Expand Down Expand Up @@ -118,7 +121,8 @@ public function __construct(
\Magento\Backend\Model\Session $backendSession,
\Magento\Framework\Math\Random $mathRandom,
\Magento\Framework\Data\Form\FormKey $formKey,
\Magento\Framework\Code\NameBuilder $nameBuilder
\Magento\Framework\Code\NameBuilder $nameBuilder,
LockGuardedCacheLoader $lockQuery = null
) {
$this->_authorization = $authorization;
$this->_backendSession = $backendSession;
Expand Down Expand Up @@ -150,7 +154,8 @@ public function __construct(
$storeManager,
$pageConfig,
$resolver,
$validator
$validator,
$lockQuery
);
}

Expand Down
11 changes: 8 additions & 3 deletions app/code/Magento/Backend/Block/Widget/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
namespace Magento\Backend\Block\Widget;

use Magento\Framework\Cache\LockGuardedCacheLoader;

/**
* Constructor modification point for Magento\Backend\Block\Widget.
*
Expand All @@ -17,7 +19,7 @@
* the classes they were introduced for.
*
* @api
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD)
* @since 100.0.2
*/
class Context extends \Magento\Backend\Block\Template\Context
Expand Down Expand Up @@ -70,6 +72,7 @@ class Context extends \Magento\Backend\Block\Template\Context
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
* @param \Magento\Backend\Block\Widget\Button\ButtonList $buttonList
* @param Button\ToolbarInterface $toolbar
* @param LockGuardedCacheLoader|null $lockQuery
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
Expand Down Expand Up @@ -105,7 +108,8 @@ public function __construct(
\Magento\Framework\Data\Form\FormKey $formKey,
\Magento\Framework\Code\NameBuilder $nameBuilder,
Button\ButtonList $buttonList,
Button\ToolbarInterface $toolbar
Button\ToolbarInterface $toolbar,
LockGuardedCacheLoader $lockQuery = null
) {
parent::__construct(
$request,
Expand Down Expand Up @@ -137,7 +141,8 @@ public function __construct(
$backendSession,
$mathRandom,
$formKey,
$nameBuilder
$nameBuilder,
$lockQuery
);

$this->buttonList = $buttonList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Backend\Controller\Adminhtml\System\Design;

class Delete extends \Magento\Backend\Controller\Adminhtml\System\Design
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
* Delete store design schedule action.
*/
class Delete extends \Magento\Backend\Controller\Adminhtml\System\Design implements HttpPostActionInterface
{
/**
* Execute action.
*
* @return \Magento\Backend\Model\View\Result\Redirect
*/
public function execute()
Expand Down
Loading

0 comments on commit 7ffabd0

Please sign in to comment.