Skip to content

Commit 6ce91b9

Browse files
Merge branch 'develop' of https://github.com/magento-performance/magento2ce into MAGETWO-69130
2 parents 8cce049 + 3993417 commit 6ce91b9

File tree

13 files changed

+372
-267
lines changed

13 files changed

+372
-267
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/summary.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@ define([
9191
var productSku = this.variationsComponent().getProductValue('sku'),
9292
productPrice = this.variationsComponent().getProductPrice(),
9393
productWeight = this.variationsComponent().getProductValue('weight'),
94+
productName = this.variationsComponent().getProductValue('name'),
9495
variationsKeys = [],
9596
gridExisting = [],
9697
gridNew = [],
9798
gridDeleted = [];
9899

99100
this.variations = [];
100101
_.each(variations, function (options) {
101-
var product, images, sku, quantity, price, variation,
102+
var product, images, sku, name, quantity, price, variation,
102103
productId = this.variationsComponent().getProductIdByOptions(options);
103104

104105
if (productId) {
@@ -110,6 +111,9 @@ define([
110111
sku = productSku + _.reduce(options, function (memo, option) {
111112
return memo + '-' + option.label;
112113
}, '');
114+
name = productName + _.reduce(options, function (memo, option) {
115+
return memo + '-' + option.label;
116+
}, '');
113117
quantity = getSectionValue('quantity', options);
114118

115119
if (!quantity && productId) {
@@ -128,7 +132,7 @@ define([
128132
options: options,
129133
images: images,
130134
sku: sku,
131-
name: sku,
135+
name: name,
132136
quantity: quantity,
133137
price: price,
134138
productId: productId,

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
?>
1212
<div class="block newsletter">
13-
<div class="title"><strong><?php /* @escapeNotVerified */ echo __('Newsletter') ?></strong></div>
13+
<div class="title"><strong><?php echo $block->escapeHtml(__('Newsletter')) ?></strong></div>
1414
<div class="content">
1515
<form class="form subscribe"
1616
novalidate

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Framework\Model\AbstractExtensibleModel;
1313
use Magento\Quote\Api\Data\PaymentInterface;
1414
use Magento\Quote\Model\Quote\Address;
15+
use Magento\Quote\Model\Quote\Address\Total as AddressTotal;
1516
use Magento\Sales\Model\Status;
1617

1718
/**
@@ -1944,7 +1945,7 @@ public function collectTotals()
19441945
/**
19451946
* Get all quote totals (sorted by priority)
19461947
*
1947-
* @return array
1948+
* @return AddressTotal[]
19481949
*/
19491950
public function getTotals()
19501951
{

app/code/Magento/Quote/Model/Quote/Address/Total.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
namespace Magento\Quote\Model\Quote\Address;
77

88
/**
9+
* @method string getCode()
10+
*
911
* @api
1012
*/
1113
class Total extends \Magento\Framework\DataObject
1214
{
1315
/**
1416
* @var array
1517
*/
16-
protected $totalAmounts;
18+
protected $totalAmounts = [];
1719

1820
/**
1921
* @var array
2022
*/
21-
protected $baseTotalAmounts;
23+
protected $baseTotalAmounts = [];
2224

2325
/**
2426
* Serializer interface instance.

app/code/Magento/Quote/Model/Quote/Address/TotalFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objManage
3333
*
3434
* @param string $instanceName
3535
* @param array $data
36-
* @return \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
36+
* @return Total\AbstractTotal|Total
3737
*/
38-
public function create($instanceName, array $data = [])
38+
public function create($instanceName = Total::class, array $data = [])
3939
{
4040
return $this->_objectManager->create($instanceName, $data);
4141
}

app/code/Magento/Quote/Model/Quote/TotalsReader.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public function __construct(
3535
/**
3636
* @param \Magento\Quote\Model\Quote $quote
3737
* @param array $total
38-
* @return array
38+
* @return Total[]
3939
*/
4040
public function fetch(\Magento\Quote\Model\Quote $quote, array $total)
4141
{
4242
$output = [];
43-
$total = $this->totalFactory->create(\Magento\Quote\Model\Quote\Address\Total::class)->setData($total);
43+
$total = $this->totalFactory->create()->setData($total);
4444
/** @var ReaderInterface $reader */
4545
foreach ($this->collectorList->getCollectors($quote->getStoreId()) as $reader) {
4646
$data = $reader->fetch($quote, $total);
@@ -62,7 +62,7 @@ public function fetch(\Magento\Quote\Model\Quote $quote, array $total)
6262

6363
/**
6464
* @param array $total
65-
* @return Total|array
65+
* @return Total|Total[]
6666
*/
6767
protected function convert($total)
6868
{
@@ -73,22 +73,20 @@ protected function convert($total)
7373
if (count(array_column($total, 'code')) > 0) {
7474
$totals = [];
7575
foreach ($total as $item) {
76-
$totals[] = $this->totalFactory->create(
77-
\Magento\Quote\Model\Quote\Address\Total::class
78-
)->setData($item);
76+
$totals[] = $this->totalFactory->create()->setData($item);
7977
}
8078
return $totals;
8179
}
8280

83-
return $this->totalFactory->create(\Magento\Quote\Model\Quote\Address\Total::class)->setData($total);
81+
return $this->totalFactory->create()->setData($total);
8482
}
8583

8684
/**
8785
* @param Total $totalInstance
88-
* @param array $output
89-
* @return array
86+
* @param Total[] $output
87+
* @return Total[]
9088
*/
91-
protected function merge($totalInstance, $output)
89+
protected function merge(Total $totalInstance, $output)
9290
{
9391
if (array_key_exists($totalInstance->getCode(), $output)) {
9492
$output[$totalInstance->getCode()] = $output[$totalInstance->getCode()]->addData(

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/optgroup.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,16 @@ define([
297297
ko.utils.arrayForEach(options, function (option) {
298298
var value = applyToObject(option, optionsValue, option),
299299
label = applyToObject(option, optionsText, value) || '',
300+
disabled = applyToObject(option, 'disabled', false) || false,
300301
obj = {},
301302
space = '\u2007\u2007\u2007';
302303

303304
obj[optionTitle] = applyToObject(option, optionsText + 'title', value);
304305

306+
if (disabled) {
307+
obj.disabled = disabled;
308+
}
309+
305310
label = label.replace(nbspRe, '').trim();
306311

307312
if (Array.isArray(value)) {

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Usps\Model;
108

119
use Magento\Framework\App\ObjectManager;
@@ -413,7 +411,6 @@ protected function _getXmlQuotes()
413411

414412
if ($this->_isUSCountry($r->getDestCountryId())) {
415413
$xml = $this->_xmlElFactory->create(
416-
417414
['data' => '<?xml version="1.0" encoding="UTF-8"?><RateV4Request/>']
418415
);
419416
$xml->addAttribute('USERID', $r->getUserId());
@@ -461,7 +458,6 @@ protected function _getXmlQuotes()
461458
$api = 'RateV4';
462459
} else {
463460
$xml = $this->_xmlElFactory->create(
464-
465461
['data' => '<?xml version = "1.0" encoding = "UTF-8"?><IntlRateV2Request/>']
466462
);
467463
$xml->addAttribute('USERID', $r->getUserId());
@@ -1946,7 +1942,7 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
19461942
*/
19471943
public function getContainerTypes(\Magento\Framework\DataObject $params = null)
19481944
{
1949-
if (is_null($params)) {
1945+
if ($params === null) {
19501946
return $this->_getAllowedContainers();
19511947
}
19521948

@@ -2068,7 +2064,7 @@ protected function _parseZip($zipString, $returnFull = false)
20682064
private function isServiceAvailable(\SimpleXMLElement $service)
20692065
{
20702066
// Allow services which which don't provide any ExtraServices
2071-
if(empty($service->ExtraServices->children()->count())) {
2067+
if (empty($service->ExtraServices->children()->count())) {
20722068
return true;
20732069
}
20742070

app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_data-grid.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ body._in-resize {
304304
.action-menu {
305305
left: auto;
306306
min-width: 10rem;
307-
right: 0;
307+
right: auto;
308308
text-align: left;
309309
top: auto;
310310
z-index: 1;

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,5 @@
257257
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
258258
}
259259
},
260-
"minimum-stability": "alpha",
261260
"prefer-stable": true
262261
}

0 commit comments

Comments
 (0)