Skip to content

Commit 5e7bc50

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #18126: [Backport] [2.2] Changed intval($val) to (int) $val, since it is faster: (by @dmytro-ch) - #18000: Fix sitemap grid render incorrect base urls for multiple stores (by @nntoan) - #18098: Fix shipping discount failed to apply during place order (by @torreytsui) - #18113: [Backport] Fixes from #15947 (by @ihor-sviziev) - #18097: [Backport] Fix import grouped products #12853 (by @insanityinside) - #17993: fix #17582 ./bin/magento config:show fails with a fatal error (by @keyurshah070) - #17679: Update shipment collection to unserialize `packages` attribute after load (by @dnsv) - #18055: fix: reset search mini-form when we have no data / an empty response (by @DanielRuf) - #14065: Correctly convert config integration api resources (by @therool) Fixed GitHub Issues: - #17999: Sitemap grid display incorrect base URL in the grid if using multiple stores (reported by @nntoan) has been fixed in #18000 by @nntoan in 2.2-develop branch Related commits: 1. 1172aae - #17582: ./bin/magento config:show fails with a fatal error (reported by @simonworkhouse) has been fixed in #17993 by @keyurshah070 in 2.2-develop branch Related commits: 1. ae503f6 - #12095: Update 2.2.1: One or more integrations have been reset because of a change to their xml configs. (reported by @thomvanderboon) has been fixed in #14065 by @therool in 2.2-develop branch Related commits: 1. 89a0a09 2. 5815a20 3. 406935b 4. 3868e81 5. 42eab52
2 parents 8eebafc + b9c495d commit 5e7bc50

File tree

20 files changed

+224
-42
lines changed

20 files changed

+224
-42
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
namespace Magento\Bundle\Model\Product;
1010

11-
use Magento\Framework\App\ObjectManager;
11+
use Magento\Bundle\Model\ResourceModel\Selection\Collection as Selections;
12+
use Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier as SelectionCollectionFilterApplier;
1213
use Magento\Catalog\Api\ProductRepositoryInterface;
14+
use Magento\Framework\App\ObjectManager;
15+
use Magento\Framework\EntityManager\MetadataPool;
1316
use Magento\Framework\Pricing\PriceCurrencyInterface;
1417
use Magento\Framework\Serialize\Serializer\Json;
15-
use Magento\Framework\EntityManager\MetadataPool;
16-
use Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier as SelectionCollectionFilterApplier;
17-
use Magento\Bundle\Model\ResourceModel\Selection\Collection as Selections;
1818

1919
/**
2020
* Bundle Type Model

app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function getCacheKeyInfo()
139139
[
140140
$this->getDisplayType(),
141141
$this->getProductsPerPage(),
142-
intval($this->getRequest()->getParam($this->getData('page_var_name'), 1)),
142+
(int) $this->getRequest()->getParam($this->getData('page_var_name'), 1),
143143
$this->serializer->serialize($this->getRequest()->getParams())
144144
]
145145
);

app/code/Magento/Catalog/Model/ImageExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function process(\DOMElement $mediaNode, $mediaParentTag)
3636
if ($attributeTagName === 'background') {
3737
$nodeValue = $this->processImageBackground($attribute->nodeValue);
3838
} elseif ($attributeTagName === 'width' || $attributeTagName === 'height') {
39-
$nodeValue = (int)$attribute->nodeValue;
39+
$nodeValue = (int)$attribute->nodeValue;
4040
} else {
4141
$nodeValue = $attribute->nodeValue;
4242
}

app/code/Magento/CatalogInventory/Model/StockStateProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use Magento\Catalog\Model\ProductFactory;
1212
use Magento\CatalogInventory\Api\Data\StockItemInterface;
1313
use Magento\CatalogInventory\Model\Spi\StockStateProviderInterface;
14+
use Magento\Framework\DataObject\Factory as ObjectFactory;
1415
use Magento\Framework\Locale\FormatInterface;
1516
use Magento\Framework\Math\Division as MathDivision;
16-
use Magento\Framework\DataObject\Factory as ObjectFactory;
1717

1818
/**
1919
* Interface StockStateProvider

app/code/Magento/CatalogWidget/Block/Product/ProductsList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function getCacheKeyInfo()
164164
$this->_storeManager->getStore()->getId(),
165165
$this->_design->getDesignTheme()->getId(),
166166
$this->httpContext->getValue(\Magento\Customer\Model\Context::CONTEXT_GROUP),
167-
intval($this->getRequest()->getParam($this->getData('page_var_name'), 1)),
167+
(int) $this->getRequest()->getParam($this->getData('page_var_name'), 1),
168168
$this->getProductsPerPage(),
169169
$conditions,
170170
$this->json->serialize($this->getRequest()->getParams()),

app/code/Magento/Config/Console/Command/ConfigShow/ValueProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function process($scope, $scopeCode, $value, $path)
9797
$field = $configStructure->getElementByConfigPath($path);
9898

9999
/** @var Value $backendModel */
100-
$backendModel = $field && $field->hasBackendModel()
100+
$backendModel = $field instanceof Field && $field->hasBackendModel()
101101
? $field->getBackendModel()
102102
: $this->configValueFactory->create();
103103

app/code/Magento/GroupedImportExport/Model/Import/Product/Type/Grouped.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function saveData()
8989
foreach ($associatedSkusAndQtyPairs as $associatedSkuAndQty) {
9090
++$position;
9191
$associatedSkuAndQty = explode(self::SKU_QTY_DELIMITER, $associatedSkuAndQty);
92-
$associatedSku = isset($associatedSkuAndQty[0]) ? trim($associatedSkuAndQty[0]) : null;
92+
$associatedSku = isset($associatedSkuAndQty[0]) ? strtolower(trim($associatedSkuAndQty[0])) : null;
9393
if (isset($newSku[$associatedSku])) {
9494
$linkedProductId = $newSku[$associatedSku][$this->getProductEntityIdentifierField()];
9595
} elseif (isset($oldSku[$associatedSku])) {

app/code/Magento/Integration/Model/Config/Consolidated/Converter.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,16 @@ public function convert($source)
8080
$result[$integrationName][self::API_RESOURCES][] = $name;
8181
}
8282
}
83+
84+
// Add root resource if any child has been added
85+
if (!empty($result[$integrationName][self::API_RESOURCES])) {
86+
array_unshift($result[$integrationName][self::API_RESOURCES], $allResources[1]['id']);
87+
}
88+
8389
// Remove any duplicates added parents
84-
$result[$integrationName][self::API_RESOURCES] =
85-
array_values(array_unique($result[$integrationName][self::API_RESOURCES]));
90+
$result[$integrationName][self::API_RESOURCES] = array_values(
91+
array_unique($result[$integrationName][self::API_RESOURCES])
92+
);
8693
}
8794
return $result;
8895
}

app/code/Magento/Integration/Test/Unit/Model/Config/Consolidated/_files/acl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
return [
77
[],
88
[
9+
'id' => 'Magento_Backend::admin',
10+
'title' => 'Magento Admin (Root)',
911
'children' =>
1012
[
1113
[

app/code/Magento/Integration/Test/Unit/Model/Config/Consolidated/_files/integration.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'endpoint_url' => 'http://endpoint.com',
1010
'identity_link_url' => 'http://www.example.com/identity',
1111
'resource' => [
12+
'Magento_Backend::admin',
1213
'Magento_Customer::manageParent',
1314
'Magento_Customer::manage',
1415
'Magento_SalesRule::quoteParent',
@@ -17,6 +18,9 @@
1718
],
1819
'TestIntegration2' => [
1920
'email' => 'test-integration2@magento.com',
20-
'resource' => ['Magento_Sales::sales']
21+
'resource' => [
22+
'Magento_Backend::admin',
23+
'Magento_Sales::sales'
24+
]
2125
]
2226
];

0 commit comments

Comments
 (0)