Skip to content

Commit 11d9560

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #18427: [Backport] Fix wrong return type in StockRegistryInterface API (by @lewisvoncken) - #18390: Backport 2.2 - Don't set a source model on the attribute when it's no� (by @hostep) - #18403: Fix setup wizard page logo (by @rafaelstz) - #18425: [Backport] Fixing Snake Case To Camel Case (by @lewisvoncken) - #18422: [BACKPORT] Replace sort callbacks to spaceship operator (by @lewisvoncken) - #18389: Backport 2.2 - Introducing a dedicated cron.log file for logging cron� (by @hostep) - #17823: [FEATURE] [issue-3283] Added Filter Support for Yes/No (boolean) attr� (by @lewisvoncken) - #18166: Fix table rate failing for zip+4 address #17770 (by @magently) - #18175: Fix category tree in cart price rule #17493 (by @magently) Fixed GitHub Issues: - #15085: StockRegistryInterface :: getLowStockItems() returns StockStatusCollection instead of StockItemCollection (reported by @jesse-dev) has been fixed in #18427 by @lewisvoncken in 2.2-develop branch Related commits: 1. adfb130 - #13156: Updating attribute option data through API will set unwanted source_model on the attribute (reported by @koenner01) has been fixed in #18390 by @hostep in 2.2-develop branch Related commits: 1. 3e066db - #17190: system.log rapidly increasing after Magento CE 2.2.5 update (cron logs) (reported by @mad-develop) has been fixed in #18389 by @hostep in 2.2-develop branch Related commits: 1. a251a8d - #3283: «Yes/No» attributes should be allowed in the Layered Navigation (reported by @dmitry-fedyuk) has been fixed in #17823 by @lewisvoncken in 2.2-develop branch Related commits: 1. 952b333 2. a2d9a6a - #17770: Table rate fail when using ZIP+4 shipping address (reported by @werfu) has been fixed in #18166 by @magently in 2.2-develop branch Related commits: 1. 6e4a4b2 - #17493: Catalog Rule & Selected Categories with level > 3 (reported by @SKovbel) has been fixed in #18175 by @magently in 2.2-develop branch Related commits: 1. 9f19592
2 parents bb68603 + ab24dbe commit 11d9560

File tree

26 files changed

+77
-82
lines changed

26 files changed

+77
-82
lines changed

app/code/Magento/Backend/Block/Widget/Button/ButtonList.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ public function getItems()
127127
*/
128128
public function sortButtons(Item $itemA, Item $itemB)
129129
{
130-
$sortOrderA = (int)$itemA->getSortOrder();
131-
$sortOrderB = (int)$itemB->getSortOrder();
132-
133-
if ($sortOrderA == $sortOrderB) {
134-
return 0;
135-
}
136-
return ($sortOrderA < $sortOrderB) ? -1 : 1;
130+
return (int)$itemA->getSortOrder() <=> (int)$itemB->getSortOrder();
137131
}
138132
}

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,10 +1013,8 @@ public function shakeSelections($firstItem, $secondItem)
10131013
$secondItem->getPosition(),
10141014
$secondItem->getSelectionId(),
10151015
];
1016-
if ($aPosition == $bPosition) {
1017-
return 0;
1018-
}
1019-
return $aPosition < $bPosition ? -1 : 1;
1016+
1017+
return $aPosition <=> $bPosition;
10201018
}
10211019

10221020
/**

app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ protected function _isOriginalIndexable()
462462
$backendType = $this->getOrigData('backend_type');
463463
$frontendInput = $this->getOrigData('frontend_input');
464464

465-
if ($backendType == 'int' && $frontendInput == 'select') {
465+
if ($backendType == 'int' && ($frontendInput == 'select' || $frontendInput == 'boolean')) {
466466
return true;
467467
} elseif ($backendType == 'varchar' && $frontendInput == 'multiselect') {
468468
return true;

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function _getIndexableAttributes($multiSelect)
8484
if ($multiSelect == true) {
8585
$select->where('ea.backend_type = ?', 'varchar')->where('ea.frontend_input = ?', 'multiselect');
8686
} else {
87-
$select->where('ea.backend_type = ?', 'int')->where('ea.frontend_input = ?', 'select');
87+
$select->where('ea.backend_type = ?', 'int')->where('ea.frontend_input IN( ? )', ['select', 'boolean']);
8888
}
8989

9090
return $this->getConnection()->fetchCol($select);

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function bindAttributeInputType()
5555
{
5656
checkOptionsPanelVisibility();
5757
switchDefaultValueField();
58-
if($('frontend_input') && ($('frontend_input').value=='select' || $('frontend_input').value=='multiselect' || $('frontend_input').value=='price')){
58+
if($('frontend_input') && ($('frontend_input').value=='boolean' || $('frontend_input').value=='select' || $('frontend_input').value=='multiselect' || $('frontend_input').value=='price')){
5959
if($('is_filterable') && !$('is_filterable').getAttribute('readonly')){
6060
$('is_filterable').disabled = false;
6161
}

app/code/Magento/Catalog/view/adminhtml/web/js/category-checkbox-tree.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ define([
230230

231231
categoryLoader.on('beforeload', function (treeLoader, node) {
232232
treeLoader.baseParams.id = node.attributes.id;
233+
treeLoader.baseParams.selected = options.jsFormObject.updateElement.value;
233234
});
234235

235236
/* eslint-disable */

app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function getProductStockStatusBySku($productSku, $scopeId = null);
7272
* @param float $qty
7373
* @param int $currentPage
7474
* @param int $pageSize
75-
* @return \Magento\CatalogInventory\Api\Data\StockStatusCollectionInterface
75+
* @return \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface
7676
*/
7777
public function getLowStockItems($scopeId, $qty, $currentPage = 1, $pageSize = 0);
7878

app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget/CategoriesJson.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ public function execute()
7777
if (!($category = $this->_initCategory())) {
7878
return;
7979
}
80+
$selected = $this->getRequest()->getPost('selected', '');
8081
$block = $this->_view->getLayout()->createBlock(
8182
\Magento\Catalog\Block\Adminhtml\Category\Checkboxes\Tree::class
8283
)->setCategoryIds(
83-
[$categoryId]
84+
explode(',', $selected)
8485
);
8586
$this->getResponse()->representJson(
8687
$block->getTreeJson($category)

app/code/Magento/Config/Model/Config/Structure/Mapper/Sorting.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ protected function _cmp($elementA, $elementB)
6262
$sortIndexB = (float)$elementB['sortOrder'];
6363
}
6464

65-
if ($sortIndexA == $sortIndexB) {
66-
return 0;
67-
}
68-
69-
return $sortIndexA < $sortIndexB ? -1 : 1;
65+
return $sortIndexA <=> $sortIndexB;
7066
}
7167
}

app/code/Magento/Cron/etc/di.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616
<type name="Magento\Framework\App\Config\Initial\Converter">
1717
<plugin name="cron_system_config_initial_converter_plugin" type="Magento\Cron\Model\System\Config\Initial\Converter" />
1818
</type>
19+
<virtualType name="Magento\Cron\Model\VirtualLoggerHandler" type="Magento\Framework\Logger\Handler\Base">
20+
<arguments>
21+
<argument name="fileName" xsi:type="string">/var/log/cron.log</argument>
22+
</arguments>
23+
</virtualType>
24+
<virtualType name="Magento\Cron\Model\VirtualLogger" type="Magento\Framework\Logger\Monolog">
25+
<arguments>
26+
<argument name="handlers" xsi:type="array">
27+
<item name="system" xsi:type="object">Magento\Cron\Model\VirtualLoggerHandler</item>
28+
</argument>
29+
</arguments>
30+
</virtualType>
1931
<!-- @api -->
2032
<virtualType name="shellBackground" type="Magento\Framework\Shell">
2133
<arguments>
@@ -25,6 +37,7 @@
2537
<type name="Magento\Cron\Observer\ProcessCronQueueObserver">
2638
<arguments>
2739
<argument name="shell" xsi:type="object">shellBackground</argument>
40+
<argument name="logger" xsi:type="object">Magento\Cron\Model\VirtualLogger</argument>
2841
</arguments>
2942
</type>
3043
<type name="Magento\Framework\Console\CommandListInterface">

0 commit comments

Comments
 (0)