Skip to content

Commit 7ffabd0

Browse files
authored
Merge pull request #4512 from magento-trigger/MC-15776
[trigger] MC-15776: Merge release branch into 2.3-develop
2 parents 777b0b0 + 1ad6fd2 commit 7ffabd0

File tree

474 files changed

+11577
-5283
lines changed

Some content is hidden

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

474 files changed

+11577
-5283
lines changed

CHANGELOG.md

Lines changed: 612 additions & 0 deletions
Large diffs are not rendered by default.

app/code/Magento/Authorization/Model/Role.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Role extends \Magento\Framework\Model\AbstractModel
4040
* @param \Magento\Authorization\Model\ResourceModel\Role\Collection $resourceCollection
4141
* @param array $data
4242
*/
43-
public function __construct(
43+
public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod
4444
\Magento\Framework\Model\Context $context,
4545
\Magento\Framework\Registry $registry,
4646
\Magento\Authorization\Model\ResourceModel\Role $resource,
@@ -52,28 +52,18 @@ public function __construct(
5252

5353
/**
5454
* @inheritDoc
55-
*
56-
* @SuppressWarnings(PHPMD.SerializationAware)
57-
* @deprecated Do not use PHP serialization.
5855
*/
5956
public function __sleep()
6057
{
61-
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
62-
6358
$properties = parent::__sleep();
6459
return array_diff($properties, ['_resource', '_resourceCollection']);
6560
}
6661

6762
/**
6863
* @inheritDoc
69-
*
70-
* @SuppressWarnings(PHPMD.SerializationAware)
71-
* @deprecated Do not use PHP serialization.
7264
*/
7365
public function __wakeup()
7466
{
75-
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
76-
7767
parent::__wakeup();
7868
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
7969
$this->_resource = $objectManager->get(\Magento\Authorization\Model\ResourceModel\Role::class);
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontVerifySecureURLRedirectAuthorizenet">
12+
<annotations>
13+
<features value="Authorizenet"/>
14+
<stories value="Storefront Secure URLs"/>
15+
<title value="Verify Secure URLs For Storefront Authorizenet Pages"/>
16+
<description value="Verify that the Secure URL configuration applies to the Authorizenet pages on the Storefront"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-15610"/>
19+
<group value="authorizenet"/>
20+
<group value="configuration"/>
21+
<group value="secure_storefront_url"/>
22+
</annotations>
23+
<before>
24+
<createData entity="Simple_US_Customer" stepKey="customer"/>
25+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
26+
<argument name="Customer" value="$$customer$$"/>
27+
</actionGroup>
28+
<executeJS function="return window.location.host" stepKey="hostname"/>
29+
<magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
30+
<magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
31+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
32+
</before>
33+
<after>
34+
<magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
35+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
36+
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
37+
</after>
38+
<executeJS function="return window.location.host" stepKey="hostname"/>
39+
<amOnUrl url="http://{$hostname}/authorizenet" stepKey="goToUnsecureAuthorizenetURL"/>
40+
<seeCurrentUrlEquals url="https://{$hostname}/authorizenet" stepKey="seeSecureAuthorizenetURL"/>
41+
</test>
42+
</tests>

app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/web/js/payment-form.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ define([
88
], function (AuthorizenetAcceptjs, $) {
99
'use strict';
1010

11-
return function (data, element) {
12-
var $form = $(element),
13-
config = data.config;
11+
return function (config, element) {
12+
var $form = $(element);
1413

1514
config.active = $form.length > 0 && !$form.is(':hidden');
1615
new AuthorizenetAcceptjs(config);

app/code/Magento/Backend/Block/Context.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block;
77

8+
use Magento\Framework\Cache\LockGuardedCacheLoader;
9+
810
/**
911
* Constructor modification point for Magento\Backend\Block\AbstractBlock.
1012
*
@@ -17,7 +19,7 @@
1719
* the classes they were introduced for.
1820
*
1921
* @api
20-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD)
2123
* @since 100.0.2
2224
*/
2325
class Context extends \Magento\Framework\View\Element\Context
@@ -44,8 +46,9 @@ class Context extends \Magento\Framework\View\Element\Context
4446
* @param \Magento\Framework\Escaper $escaper
4547
* @param \Magento\Framework\Filter\FilterManager $filterManager
4648
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
47-
* @param \Magento\Framework\AuthorizationInterface $authorization
4849
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
50+
* @param \Magento\Framework\AuthorizationInterface $authorization
51+
* @param LockGuardedCacheLoader|null $lockQuery
4952
*
5053
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
5154
*/
@@ -67,7 +70,8 @@ public function __construct(
6770
\Magento\Framework\Filter\FilterManager $filterManager,
6871
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
6972
\Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
70-
\Magento\Framework\AuthorizationInterface $authorization
73+
\Magento\Framework\AuthorizationInterface $authorization,
74+
LockGuardedCacheLoader $lockQuery = null
7175
) {
7276
$this->_authorization = $authorization;
7377
parent::__construct(
@@ -87,7 +91,8 @@ public function __construct(
8791
$escaper,
8892
$filterManager,
8993
$localeDate,
90-
$inlineTranslation
94+
$inlineTranslation,
95+
$lockQuery
9196
);
9297
}
9398

app/code/Magento/Backend/Block/System/Design/Edit.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\Backend\Block\System\Design;
77

8+
/**
9+
* Edit store design schedule block.
10+
*/
811
class Edit extends \Magento\Backend\Block\Widget
912
{
1013
/**
@@ -20,6 +23,8 @@ class Edit extends \Magento\Backend\Block\Widget
2023
protected $_coreRegistry = null;
2124

2225
/**
26+
* @inheritdoc
27+
*
2328
* @param \Magento\Backend\Block\Template\Context $context
2429
* @param \Magento\Framework\Registry $registry
2530
* @param array $data
@@ -34,6 +39,8 @@ public function __construct(
3439
}
3540

3641
/**
42+
* @inheritdoc
43+
*
3744
* @return void
3845
*/
3946
protected function _construct()
@@ -44,7 +51,7 @@ protected function _construct()
4451
}
4552

4653
/**
47-
* {@inheritdoc}
54+
* @inheritdoc
4855
*/
4956
protected function _prepareLayout()
5057
{
@@ -66,7 +73,7 @@ protected function _prepareLayout()
6673
'label' => __('Delete'),
6774
'onclick' => 'deleteConfirm(\'' . __(
6875
'Are you sure?'
69-
) . '\', \'' . $this->getDeleteUrl() . '\')',
76+
) . '\', \'' . $this->getDeleteUrl() . '\', {data: {}})',
7077
'class' => 'delete'
7178
]
7279
);
@@ -88,6 +95,8 @@ protected function _prepareLayout()
8895
}
8996

9097
/**
98+
* Return design change Id.
99+
*
91100
* @return string
92101
*/
93102
public function getDesignChangeId()
@@ -96,6 +105,8 @@ public function getDesignChangeId()
96105
}
97106

98107
/**
108+
* Return delete url.
109+
*
99110
* @return string
100111
*/
101112
public function getDeleteUrl()
@@ -104,6 +115,8 @@ public function getDeleteUrl()
104115
}
105116

106117
/**
118+
* Return save url for edit form.
119+
*
107120
* @return string
108121
*/
109122
public function getSaveUrl()
@@ -112,6 +125,8 @@ public function getSaveUrl()
112125
}
113126

114127
/**
128+
* Return validation url for edit form.
129+
*
115130
* @return string
116131
*/
117132
public function getValidationUrl()
@@ -120,6 +135,8 @@ public function getValidationUrl()
120135
}
121136

122137
/**
138+
* Return page header.
139+
*
123140
* @return string
124141
*/
125142
public function getHeader()

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\Template;
77

8+
use Magento\Framework\Cache\LockGuardedCacheLoader;
9+
810
/**
911
* Constructor modification point for Magento\Backend\Block\Template.
1012
*
@@ -85,6 +87,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
8587
* @param \Magento\Framework\Math\Random $mathRandom
8688
* @param \Magento\Framework\Data\Form\FormKey $formKey
8789
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
90+
* @param LockGuardedCacheLoader|null $lockQuery
8891
*
8992
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
9093
*/
@@ -118,7 +121,8 @@ public function __construct(
118121
\Magento\Backend\Model\Session $backendSession,
119122
\Magento\Framework\Math\Random $mathRandom,
120123
\Magento\Framework\Data\Form\FormKey $formKey,
121-
\Magento\Framework\Code\NameBuilder $nameBuilder
124+
\Magento\Framework\Code\NameBuilder $nameBuilder,
125+
LockGuardedCacheLoader $lockQuery = null
122126
) {
123127
$this->_authorization = $authorization;
124128
$this->_backendSession = $backendSession;
@@ -150,7 +154,8 @@ public function __construct(
150154
$storeManager,
151155
$pageConfig,
152156
$resolver,
153-
$validator
157+
$validator,
158+
$lockQuery
154159
);
155160
}
156161

app/code/Magento/Backend/Block/Widget/Context.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\Widget;
77

8+
use Magento\Framework\Cache\LockGuardedCacheLoader;
9+
810
/**
911
* Constructor modification point for Magento\Backend\Block\Widget.
1012
*
@@ -17,7 +19,7 @@
1719
* the classes they were introduced for.
1820
*
1921
* @api
20-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD)
2123
* @since 100.0.2
2224
*/
2325
class Context extends \Magento\Backend\Block\Template\Context
@@ -70,6 +72,7 @@ class Context extends \Magento\Backend\Block\Template\Context
7072
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
7173
* @param \Magento\Backend\Block\Widget\Button\ButtonList $buttonList
7274
* @param Button\ToolbarInterface $toolbar
75+
* @param LockGuardedCacheLoader|null $lockQuery
7376
*
7477
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
7578
*/
@@ -105,7 +108,8 @@ public function __construct(
105108
\Magento\Framework\Data\Form\FormKey $formKey,
106109
\Magento\Framework\Code\NameBuilder $nameBuilder,
107110
Button\ButtonList $buttonList,
108-
Button\ToolbarInterface $toolbar
111+
Button\ToolbarInterface $toolbar,
112+
LockGuardedCacheLoader $lockQuery = null
109113
) {
110114
parent::__construct(
111115
$request,
@@ -137,7 +141,8 @@ public function __construct(
137141
$backendSession,
138142
$mathRandom,
139143
$formKey,
140-
$nameBuilder
144+
$nameBuilder,
145+
$lockQuery
141146
);
142147

143148
$this->buttonList = $buttonList;

app/code/Magento/Backend/Controller/Adminhtml/System/Design/Delete.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Backend\Controller\Adminhtml\System\Design;
87

9-
class Delete extends \Magento\Backend\Controller\Adminhtml\System\Design
8+
use Magento\Framework\App\Action\HttpPostActionInterface;
9+
10+
/**
11+
* Delete store design schedule action.
12+
*/
13+
class Delete extends \Magento\Backend\Controller\Adminhtml\System\Design implements HttpPostActionInterface
1014
{
1115
/**
16+
* Execute action.
17+
*
1218
* @return \Magento\Backend\Model\View\Result\Redirect
1319
*/
1420
public function execute()

0 commit comments

Comments
 (0)