Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 3ba9281

Browse files
authored
Merge pull request #2 from magento/2.3-develop
merge request
2 parents cc6aaa3 + 072ef37 commit 3ba9281

File tree

194 files changed

+3184
-704
lines changed

Some content is hidden

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

194 files changed

+3184
-704
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ To get detailed information about changes in Magento 2.1.0, please visit [Magent
157157
* Updated styles
158158
* Sample Data:
159159
* Improved sample data installation UX
160-
* Updated sample data with Product Heros, color swatches, MAP and rule based product relations
160+
* Updated sample data with Product Heroes, color swatches, MAP and rule based product relations
161161
* Improved sample data upgrade flow
162162
* Added the ability to log errors and set the error flag during sample data installation
163163
* Various improvements:
@@ -2284,7 +2284,7 @@ Tests:
22842284
* Fixed an issue where no results were found for Coupons reports
22852285
* Fixed an issue with incremental Qty setting
22862286
* Fixed an issue with allowing importing of negative weight values
2287-
* Fixed an issue with Inventory - Only X left Treshold being not dependent on Qty for Item's Status to Become Out of Stock
2287+
* Fixed an issue with Inventory - Only X left Threshold being not dependent on Qty for Item's Status to Become Out of Stock
22882288
* Fixed an issue where the "Catalog Search Index index was rebuilt." message was displayed when reindexing the Catalog Search index
22892289
* Search module:
22902290
* Integrated the Search library to the advanced search functionality
@@ -2706,7 +2706,7 @@ Tests:
27062706
* Ability to support extensible service data objects
27072707
* No Code Duplication in Root Templates
27082708
* Fixed bugs:
2709-
* Persistance session application. Loggin out the customer
2709+
* Persistence session application. Logging out the customer
27102710
* Placing the order with two terms and conditions
27112711
* Saving of custom option by service catalogProductCustomOptionsWriteServiceV1
27122712
* Placing the order on frontend if enter in the street address line 1 and 2 255 symbols
@@ -2965,7 +2965,7 @@ Tests:
29652965
* Fixed an issue with incorrect items label for the cases when there are more than one item in the category
29662966
* Fixed an issue when configurable product was out of stock in Google Shopping while being in stock in the Magento backend
29672967
* Fixed an issue when swipe gesture in menu widget was not supported on mobile
2968-
* Fixed an issue when it was impossible to enter alpha-numeric zip code on the stage of estimating shipping and tax rates
2968+
* Fixed an issue when it was impossible to enter alphanumeric zip code on the stage of estimating shipping and tax rates
29692969
* Fixed an issue when custom price was not applied when editing an order
29702970
* Fixed an issue when items were not returned to stock after unsuccessful order was placed
29712971
* Fixed an issue when error message appeared "Cannot save the credit memo” while creating credit memo

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ public function testGetAllWebsitesValue()
103103
$this->webSiteModel->expects($this->once())->method('getBaseCurrency')->willReturn($currency);
104104

105105
$expectedResult = AdvancedPricing::VALUE_ALL_WEBSITES . ' [' . $currencyCode . ']';
106-
$this->websiteString = $this->getMockBuilder(
106+
$websiteString = $this->getMockBuilder(
107107
\Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator\Website::class
108108
)
109109
->setMethods(['_clearMessages', '_addMessages'])
110110
->setConstructorArgs([$this->storeResolver, $this->webSiteModel])
111111
->getMock();
112-
$result = $this->websiteString->getAllWebsitesValue();
112+
$result = $websiteString->getAllWebsitesValue();
113113

114114
$this->assertEquals($expectedResult, $result);
115115
}

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-63898"/>
1919
<group value="analytics"/>
20+
<skip>
21+
<issueId value="MAGETWO-96223"/>
22+
</skip>
2023
</annotations>
2124

2225
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/AsynchronousOperations/Controller/Adminhtml/Bulk/Details.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
namespace Magento\AsynchronousOperations\Controller\Adminhtml\Bulk;
77

88
/**
9-
* Class View Opertion Details Controller
9+
* Class View Operation Details Controller
1010
*/
11-
class Details extends \Magento\Backend\App\Action
11+
class Details extends \Magento\Backend\App\Action implements \Magento\Framework\App\Action\HttpGetActionInterface
1212
{
1313
/**
1414
* @var \Magento\Framework\View\Result\PageFactory

app/code/Magento/Backend/App/Request/BackendValidator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public function __construct(
7777
}
7878

7979
/**
80+
* Validate request
81+
*
8082
* @param RequestInterface $request
8183
* @param ActionInterface $action
8284
*
@@ -115,6 +117,8 @@ private function validateRequest(
115117
}
116118

117119
/**
120+
* Create exception
121+
*
118122
* @param RequestInterface $request
119123
* @param ActionInterface $action
120124
*
@@ -166,7 +170,7 @@ public function validate(
166170
ActionInterface $action
167171
): void {
168172
if ($action instanceof AbstractAction) {
169-
//Abstract Action has build-in validation.
173+
//Abstract Action has built-in validation.
170174
if (!$action->_processUrlKeys()) {
171175
throw new InvalidRequestException($action->getResponse());
172176
}

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Theme.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
*/
1010
namespace Magento\Backend\Block\Widget\Grid\Column\Filter;
1111

12+
/**
13+
* Theme grid filter
14+
*/
1215
class Theme extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter
1316
{
1417
/**
@@ -54,7 +57,8 @@ public function getHtml()
5457
}
5558

5659
/**
57-
* Retrieve options setted in column.
60+
* Retrieve options set in column.
61+
*
5862
* Or load if options was not set.
5963
*
6064
* @return array

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

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Magento\Backend\Block\Widget\Tab\TabInterface;
99

1010
/**
11+
* Tabs widget
12+
*
1113
* @api
1214
* @SuppressWarnings(PHPMD.NumberOfChildren)
1315
* @since 100.0.2
@@ -178,6 +180,8 @@ protected function _addTabByName($tab, $tabId)
178180
}
179181

180182
/**
183+
* Get active tab id
184+
*
181185
* @return string
182186
*/
183187
public function getActiveTabId()
@@ -187,6 +191,7 @@ public function getActiveTabId()
187191

188192
/**
189193
* Set Active Tab
194+
*
190195
* Tab has to be not hidden and can show
191196
*
192197
* @param string $tabId
@@ -231,7 +236,7 @@ protected function _setActiveTab($tabId)
231236
}
232237

233238
/**
234-
* {@inheritdoc}
239+
* @inheritdoc
235240
*/
236241
protected function _beforeToHtml()
237242
{
@@ -282,6 +287,8 @@ private function reorderTabs()
282287
}
283288

284289
/**
290+
* Apply tabs order
291+
*
285292
* @param array $orderByPosition
286293
* @param array $orderByIdentity
287294
*
@@ -294,7 +301,7 @@ private function applyTabsCorrectOrder(array $orderByPosition, array $orderByIde
294301
/**
295302
* Rearrange the positions by using the after tag for each tab.
296303
*
297-
* @var integer $position
304+
* @var int $position
298305
* @var TabInterface $tab
299306
*/
300307
foreach ($orderByPosition as $position => $tab) {
@@ -338,6 +345,8 @@ private function finalTabsSortOrder(array $orderByPosition)
338345
}
339346

340347
/**
348+
* Get js object name
349+
*
341350
* @return string
342351
*/
343352
public function getJsObjectName()
@@ -346,6 +355,8 @@ public function getJsObjectName()
346355
}
347356

348357
/**
358+
* Get tabs ids
359+
*
349360
* @return string[]
350361
*/
351362
public function getTabsIds()
@@ -358,6 +369,8 @@ public function getTabsIds()
358369
}
359370

360371
/**
372+
* Get tab id
373+
*
361374
* @param \Magento\Framework\DataObject|TabInterface $tab
362375
* @param bool $withPrefix
363376
* @return string
@@ -371,6 +384,8 @@ public function getTabId($tab, $withPrefix = true)
371384
}
372385

373386
/**
387+
* CVan show tab
388+
*
374389
* @param \Magento\Framework\DataObject|TabInterface $tab
375390
* @return bool
376391
*/
@@ -383,6 +398,8 @@ public function canShowTab($tab)
383398
}
384399

385400
/**
401+
* Get tab is hidden
402+
*
386403
* @param \Magento\Framework\DataObject|TabInterface $tab
387404
* @return bool
388405
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
@@ -396,6 +413,8 @@ public function getTabIsHidden($tab)
396413
}
397414

398415
/**
416+
* Get tab url
417+
*
399418
* @param \Magento\Framework\DataObject|TabInterface $tab
400419
* @return string
401420
*/
@@ -414,6 +433,8 @@ public function getTabUrl($tab)
414433
}
415434

416435
/**
436+
* Get tab title
437+
*
417438
* @param \Magento\Framework\DataObject|TabInterface $tab
418439
* @return string
419440
*/
@@ -426,6 +447,8 @@ public function getTabTitle($tab)
426447
}
427448

428449
/**
450+
* Get tab class
451+
*
429452
* @param \Magento\Framework\DataObject|TabInterface $tab
430453
* @return string
431454
*/
@@ -441,6 +464,8 @@ public function getTabClass($tab)
441464
}
442465

443466
/**
467+
* Get tab label
468+
*
444469
* @param \Magento\Framework\DataObject|TabInterface $tab
445470
* @return string
446471
*/
@@ -453,6 +478,8 @@ public function getTabLabel($tab)
453478
}
454479

455480
/**
481+
* Get tab content
482+
*
456483
* @param \Magento\Framework\DataObject|TabInterface $tab
457484
* @return string
458485
*/
@@ -468,7 +495,8 @@ public function getTabContent($tab)
468495
}
469496

470497
/**
471-
* Mark tabs as dependant of each other
498+
* Mark tabs as dependent of each other
499+
*
472500
* Arbitrary number of tabs can be specified, but at least two
473501
*
474502
* @param string $tabOneId

app/code/Magento/Backend/Console/Command/AbstractCacheCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
use Symfony\Component\Console\Input\InputOption;
1212

1313
/**
14+
* Abstract cache command
15+
*
1416
* @api
1517
* @since 100.0.2
1618
*/
1719
abstract class AbstractCacheCommand extends Command
1820
{
1921
/**
20-
* Input option bootsrap
22+
* Input option bootstrap
2123
*/
2224
const INPUT_KEY_BOOTSTRAP = 'bootstrap';
2325

@@ -40,7 +42,7 @@ public function __construct(Manager $cacheManager)
4042
}
4143

4244
/**
43-
* {@inheritdoc}
45+
* @inheritdoc
4446
*/
4547
protected function configure()
4648
{

app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,6 @@ public function testGetMenuGenericExceptionIsNotLogged()
168168
} catch (\Exception $e) {
169169
return;
170170
}
171-
$this->fail("Generic \Exception was not throwed");
171+
$this->fail("Generic \Exception was not thrown");
172172
}
173173
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<field id="*/*/template_hints_storefront">1</field>
130130
<field id="*/*/template_hints_storefront_show_with_parameter">1</field>
131131
</depends>
132-
<comment>Add the following paramater to the URL to show template hints ?templatehints=[parameter_value]</comment>
132+
<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">
135135
<label>Enabled Template Path Hints for Admin</label>

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Bundle\Model\Option;
99
use Magento\Catalog\Model\Product;
10+
use Magento\Framework\DataObject;
1011

1112
/**
1213
* Catalog bundle product info block
@@ -170,7 +171,7 @@ public function getJsonConfig()
170171

171172
$defaultValues = [];
172173
$preConfiguredFlag = $currentProduct->hasPreconfiguredValues();
173-
/** @var \Magento\Framework\DataObject|null $preConfiguredValues */
174+
/** @var DataObject|null $preConfiguredValues */
174175
$preConfiguredValues = $preConfiguredFlag ? $currentProduct->getPreconfiguredValues() : null;
175176

176177
$position = 0;
@@ -193,12 +194,13 @@ public function getJsonConfig()
193194
$options[$optionId]['selections'][$configValue]['qty'] = $configQty;
194195
}
195196
}
197+
$options = $this->processOptions($optionId, $options, $preConfiguredValues);
196198
}
197199
$position++;
198200
}
199201
$config = $this->getConfigData($currentProduct, $options);
200202

201-
$configObj = new \Magento\Framework\DataObject(
203+
$configObj = new DataObject(
202204
[
203205
'config' => $config,
204206
]
@@ -403,4 +405,30 @@ private function getConfigData(Product $product, array $options)
403405
];
404406
return $config;
405407
}
408+
409+
/**
410+
* Set preconfigured quantities and selections to options.
411+
*
412+
* @param string $optionId
413+
* @param array $options
414+
* @param DataObject $preConfiguredValues
415+
* @return array
416+
*/
417+
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
418+
{
419+
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
420+
$selections = $options[$optionId]['selections'];
421+
array_walk($selections, function (&$selection, $selectionId) use ($preConfiguredQtys) {
422+
if (is_array($preConfiguredQtys) && isset($preConfiguredQtys[$selectionId])) {
423+
$selection['qty'] = $preConfiguredQtys[$selectionId];
424+
} else {
425+
if ((int)$preConfiguredQtys > 0) {
426+
$selection['qty'] = $preConfiguredQtys;
427+
}
428+
}
429+
});
430+
$options[$optionId]['selections'] = $selections;
431+
432+
return $options;
433+
}
406434
}

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ protected function _getSelectedOptions()
167167
*/
168168
protected function assignSelection(\Magento\Bundle\Model\Option $option, $selectionId)
169169
{
170-
if ($selectionId && $option->getSelectionById($selectionId)) {
170+
if (is_array($selectionId)) {
171+
$this->_selectedOptions = $selectionId;
172+
} else if ($selectionId && $option->getSelectionById($selectionId)) {
171173
$this->_selectedOptions = $selectionId;
172174
} elseif (!$option->getRequired()) {
173175
$this->_selectedOptions = 'None';
@@ -228,6 +230,8 @@ public function getProduct()
228230
}
229231

230232
/**
233+
* Get bundle option price title.
234+
*
231235
* @param \Magento\Catalog\Model\Product $selection
232236
* @param bool $includeContainer
233237
* @return string

0 commit comments

Comments
 (0)