Skip to content

Commit 81a4de8

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into add-sort-order-downloadable-links
# Conflicts: # app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php # app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php
2 parents 03f0c3a + 9ef2d45 commit 81a4de8

File tree

504 files changed

+16784
-8248
lines changed

Some content is hidden

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

504 files changed

+16784
-8248
lines changed

app/code/Magento/AdvancedSearch/etc/adminhtml/system.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@
4848
</depends>
4949
</field>
5050
<!--<group id="suggestions">-->
51-
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
51+
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
5252
<label>Enable Search Suggestions</label>
5353
<comment>When you enable this option your site may slow down.</comment>
5454
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
5555
</field>
56-
<field id="search_suggestion_count" translate="label" type="text" sortOrder="71" showInDefault="1" showInWebsite="1" showInStore="1">
56+
<field id="search_suggestion_count" translate="label" type="text" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="1">
5757
<label>Search Suggestions Count</label>
5858
<depends>
5959
<field id="search_suggestion_enabled">1</field>
6060
</depends>
6161
</field>
62-
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="72" showInDefault="1" showInWebsite="1" showInStore="1">
62+
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="1">
6363
<label>Show Results Count for Each Suggestion</label>
6464
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
6565
<comment>When you enable this option your site may slow down.</comment>

app/code/Magento/AuthorizenetAcceptjs/etc/payment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
1010
<methods>
1111
<method name="authorizenet_acceptjs">
12-
<allow_multiple_address>1</allow_multiple_address>
12+
<allow_multiple_address>0</allow_multiple_address>
1313
</method>
1414
</methods>
1515
</payment>

app/code/Magento/AuthorizenetAcceptjs/view/base/requirejs-config.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
*/
55

66
var config = {
7-
shim: {
8-
acceptjs: {
9-
exports: 'Accept'
10-
},
11-
acceptjssandbox: {
12-
exports: 'Accept'
7+
map: {
8+
'*': {
9+
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept.js',
10+
acceptjs: 'https://js.authorize.net/v1/Accept.js'
1311
}
14-
},
15-
paths: {
16-
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept',
17-
acceptjs: 'https://js.authorize.net/v1/Accept'
1812
}
1913
};

app/code/Magento/AuthorizenetAcceptjs/view/base/web/js/view/payment/acceptjs-factory.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define([
1616
dependency = 'acceptjssandbox';
1717
}
1818

19-
require([dependency], function (accept) {
19+
require([dependency], function () {
2020
var $body = $('body');
2121

2222
/*
@@ -26,7 +26,16 @@ define([
2626
* Dynamically-loading-Accept-js-E-WC-03-Accept-js-is-not-loaded/td-p/63283
2727
*/
2828
$body.on('handshake.acceptjs', function () {
29-
deferred.resolve(accept);
29+
/*
30+
* Accept.js doesn't return the library when loading
31+
* and requirejs "shim" can't be used because it only works with the "paths" config option
32+
* and we can't use "paths" because require will try to load ".min.js" in production
33+
* and that doesn't work because it doesn't exist
34+
* and we can't add a query string to force a URL because accept.js will reject it
35+
* and we can't include it locally because they check in the script before loading more scripts
36+
* So, we use the global version as "shim" would
37+
*/
38+
deferred.resolve(window.Accept);
3039
$body.off('handshake.acceptjs');
3140
});
3241
},

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @api
2020
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2223
* @since 100.0.2
2324
*/
2425
class Context extends \Magento\Framework\View\Element\Template\Context
@@ -174,7 +175,7 @@ public function getAuthorization()
174175
}
175176

176177
/**
177-
* Get Backend Session
178+
* Get backend session instance.
178179
*
179180
* @return \Magento\Backend\Model\Session
180181
*/
@@ -184,7 +185,7 @@ public function getBackendSession()
184185
}
185186

186187
/**
187-
* Get Math Random
188+
* Get math random instance.
188189
*
189190
* @return \Magento\Framework\Math\Random
190191
*/
@@ -194,7 +195,7 @@ public function getMathRandom()
194195
}
195196

196197
/**
197-
* Get Form Key
198+
* Get form key instance.
198199
*
199200
* @return \Magento\Framework\Data\Form\FormKey
200201
*/
@@ -204,7 +205,7 @@ public function getFormKey()
204205
}
205206

206207
/**
207-
* Get Class Name Builder
208+
* Get name builder instance.
208209
*
209210
* @return \Magento\Framework\Code\NameBuilder
210211
*/

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
2828
protected $_column;
2929

3030
/**
31+
* Set column for renderer.
32+
*
3133
* @param Column $column
3234
* @return $this
3335
*/
@@ -38,6 +40,8 @@ public function setColumn($column)
3840
}
3941

4042
/**
43+
* Returns row associated with the renderer.
44+
*
4145
* @return Column
4246
*/
4347
public function getColumn()
@@ -48,7 +52,7 @@ public function getColumn()
4852
/**
4953
* Renders grid column
5054
*
51-
* @param Object $row
55+
* @param DataObject $row
5256
* @return string
5357
*/
5458
public function render(DataObject $row)
@@ -66,7 +70,7 @@ public function render(DataObject $row)
6670
/**
6771
* Render column for export
6872
*
69-
* @param Object $row
73+
* @param DataObject $row
7074
* @return string
7175
*/
7276
public function renderExport(DataObject $row)
@@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
7579
}
7680

7781
/**
78-
* @param Object $row
82+
* Returns value of the row.
83+
*
84+
* @param DataObject $row
7985
* @return mixed
8086
*/
8187
protected function _getValue(DataObject $row)
@@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
9298
}
9399

94100
/**
95-
* @param Object $row
101+
* Get pre-rendered input element.
102+
*
103+
* @param DataObject $row
96104
* @return string
97105
*/
98106
public function _getInputValueElement(DataObject $row)
@@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
108116
}
109117

110118
/**
111-
* @param Object $row
119+
* Get input value by row.
120+
*
121+
* @param DataObject $row
112122
* @return mixed
113123
*/
114124
protected function _getInputValue(DataObject $row)
@@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
117127
}
118128

119129
/**
130+
* Renders header of the column,
131+
*
120132
* @return string
121133
*/
122134
public function renderHeader()
@@ -148,6 +160,8 @@ public function renderHeader()
148160
}
149161

150162
/**
163+
* Render HTML properties.
164+
*
151165
* @return string
152166
*/
153167
public function renderProperty()
@@ -172,6 +186,8 @@ public function renderProperty()
172186
}
173187

174188
/**
189+
* Returns HTML for CSS.
190+
*
175191
* @return string
176192
*/
177193
public function renderCss()

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class ProductsViewed extends AjaxBlock
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
10+
11+
/**
12+
* Get most viewed products controller.
13+
*/
14+
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
1015
{
1116
/**
1217
* Gets most viewed products list
1318
*
14-
* @return \Magento\Backend\Model\View\Result\Page
19+
* @return \Magento\Framework\Controller\Result\Raw
1520
*/
1621
public function execute()
1722
{

app/code/Magento/Backend/Model/Session/Quote.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @method Quote setOrderId($orderId)
2525
* @method int getOrderId()
2626
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
27+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2728
* @since 100.0.2
2829
*/
2930
class Quote extends \Magento\Framework\Session\SessionManager
@@ -149,7 +150,8 @@ public function getQuote()
149150
$this->_quote = $this->quoteFactory->create();
150151
if ($this->getStoreId()) {
151152
if (!$this->getQuoteId()) {
152-
$this->_quote->setCustomerGroupId($this->groupManagement->getDefaultGroup()->getId());
153+
$customerGroupId = $this->groupManagement->getDefaultGroup($this->getStoreId())->getId();
154+
$this->_quote->setCustomerGroupId($customerGroupId);
153155
$this->_quote->setIsActive(false);
154156
$this->_quote->setStoreId($this->getStoreId());
155157

app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ public function testGetQuoteWithoutQuoteId()
267267
$cartInterfaceMock->expects($this->atLeastOnce())->method('getId')->willReturn($quoteId);
268268
$defaultGroup = $this->getMockBuilder(\Magento\Customer\Api\Data\GroupInterface::class)->getMock();
269269
$defaultGroup->expects($this->any())->method('getId')->will($this->returnValue($customerGroupId));
270-
$this->groupManagementMock->expects($this->any())->method('getDefaultGroup')->willReturn($defaultGroup);
270+
$this->groupManagementMock
271+
->method('getDefaultGroup')
272+
->with($storeId)
273+
->willReturn($defaultGroup);
271274

272275
$dataCustomerMock = $this->getMockBuilder(\Magento\Customer\Api\Data\CustomerInterface::class)
273276
->disableOriginalConstructor()

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
113113
<label>Debug</label>
114114
<field id="template_hints_storefront" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
115-
<label>Enabled Template Path Hints for Storefront</label>
115+
<label>Enable Template Path Hints for Storefront</label>
116116
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
117117
</field>
118118
<field id="template_hints_storefront_show_with_parameter" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
@@ -132,7 +132,7 @@
132132
<comment>Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]</comment>
133133
</field>
134134
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
135-
<label>Enabled Template Path Hints for Admin</label>
135+
<label>Enable Template Path Hints for Admin</label>
136136
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
137137
</field>
138138
<field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">

app/code/Magento/Backup/Controller/Adminhtml/Index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Backup\Controller\Adminhtml;
77

88
use Magento\Backend\App\Action;
9-
use Magento\Framework\App\Action\HttpGetActionInterface;
109
use Magento\Backup\Helper\Data as Helper;
1110
use Magento\Framework\App\ObjectManager;
1211

@@ -18,7 +17,7 @@
1817
* @since 100.0.2
1918
* @SuppressWarnings(PHPMD.AllPurposeAction)
2019
*/
21-
abstract class Index extends Action implements HttpGetActionInterface
20+
abstract class Index extends Action
2221
{
2322
/**
2423
* Authorization level of a basic admin session

app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php

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

8+
use Magento\Framework\App\Action\HttpPostActionInterface;
99
use Magento\Framework\App\Filesystem\DirectoryList;
1010
use Magento\Framework\Filesystem;
1111

12-
class Create extends \Magento\Backup\Controller\Adminhtml\Index
12+
/**
13+
* Create backup controller
14+
*/
15+
class Create extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
1316
{
1417
/**
1518
* Create backup action.

app/code/Magento/Backup/Model/Db.php

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\Backup\Model;
77

88
use Magento\Backup\Helper\Data as Helper;
9+
use Magento\Backup\Model\ResourceModel\Table\GetListTables;
10+
use Magento\Backup\Model\ResourceModel\View\CreateViewsBackup;
911
use Magento\Framework\App\ObjectManager;
1012
use Magento\Framework\Exception\RuntimeException;
1113

@@ -44,18 +46,35 @@ class Db implements \Magento\Framework\Backup\Db\BackupDbInterface
4446
private $helper;
4547

4648
/**
47-
* @param \Magento\Backup\Model\ResourceModel\Db $resourceDb
49+
* @var GetListTables
50+
*/
51+
private $getListTables;
52+
53+
/**
54+
* @var CreateViewsBackup
55+
*/
56+
private $getViewsBackup;
57+
58+
/**
59+
* Db constructor.
60+
* @param ResourceModel\Db $resourceDb
4861
* @param \Magento\Framework\App\ResourceConnection $resource
4962
* @param Helper|null $helper
63+
* @param GetListTables|null $getListTables
64+
* @param CreateViewsBackup|null $getViewsBackup
5065
*/
5166
public function __construct(
52-
\Magento\Backup\Model\ResourceModel\Db $resourceDb,
67+
ResourceModel\Db $resourceDb,
5368
\Magento\Framework\App\ResourceConnection $resource,
54-
?Helper $helper = null
69+
?Helper $helper = null,
70+
?GetListTables $getListTables = null,
71+
?CreateViewsBackup $getViewsBackup = null
5572
) {
5673
$this->_resourceDb = $resourceDb;
5774
$this->_resource = $resource;
5875
$this->helper = $helper ?? ObjectManager::getInstance()->get(Helper::class);
76+
$this->getListTables = $getListTables ?? ObjectManager::getInstance()->get(GetListTables::class);
77+
$this->getViewsBackup = $getViewsBackup ?? ObjectManager::getInstance()->get(CreateViewsBackup::class);
5978
}
6079

6180
/**
@@ -161,7 +180,7 @@ public function createBackup(\Magento\Framework\Backup\Db\BackupInterface $backu
161180

162181
$this->getResource()->beginTransaction();
163182

164-
$tables = $this->getResource()->getTables();
183+
$tables = $this->getListTables->execute();
165184

166185
$backup->write($this->getResource()->getHeader());
167186

@@ -198,6 +217,8 @@ public function createBackup(\Magento\Framework\Backup\Db\BackupInterface $backu
198217
$backup->write($this->getResource()->getTableDataAfterSql($table));
199218
}
200219
}
220+
$this->getViewsBackup->execute($backup);
221+
201222
$backup->write($this->getResource()->getTableForeignKeysSql());
202223
$backup->write($this->getResource()->getTableTriggersSql());
203224
$backup->write($this->getResource()->getFooter());

0 commit comments

Comments
 (0)