Skip to content

Commit d018643

Browse files
committed
MAGETWO-93258: [Forwardport] Optimize retrieving product attributes
1 parent 249f577 commit d018643

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\CatalogInventory\Model;
6+
namespace Magento\Catalog\Model;
77

88
/**
99
* Filter custom attributes for product using the blacklist

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\Catalog\Api\Data\ProductInterface;
1111
use Magento\Catalog\Api\ProductLinkRepositoryInterface;
1212
use Magento\Catalog\Model\Product\Attribute\Backend\Media\EntryConverterPool;
13-
use Magento\CatalogInventory\Model\FilterProductCustomAttribute;
13+
use Magento\Catalog\Model\FilterProductCustomAttribute;
1414
use Magento\Framework\Api\AttributeValueFactory;
1515
use Magento\Framework\App\Filesystem\DirectoryList;
1616
use Magento\Framework\App\ObjectManager;

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class ProductTest extends \PHPUnit\Framework\TestCase
8080
protected $_priceInfoMock;
8181

8282
/**
83-
* @var \Magento\CatalogInventory\Model\FilterProductCustomAttribute|\PHPUnit_Framework_MockObject_MockObject
83+
* @var \Magento\Catalog\Model\FilterProductCustomAttribute|\PHPUnit_Framework_MockObject_MockObject
8484
*/
8585
private $filterCustomAttribute;
8686

@@ -381,7 +381,7 @@ protected function setUp()
381381
->willReturn($this->extensionAttributes);
382382

383383
$this->filterCustomAttribute = $this->createTestProxy(
384-
\Magento\CatalogInventory\Model\FilterProductCustomAttribute::class
384+
\Magento\Catalog\Model\FilterProductCustomAttribute::class
385385
);
386386

387387
$this->objectManagerHelper = new ObjectManagerHelper($this);

app/code/Magento/CatalogInventory/Model/Plugin/FilterCustomAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\CatalogInventory\Model\Plugin;
99

1010
use Magento\Catalog\Model\Product\Attribute\Repository;
11-
use Magento\CatalogInventory\Model\FilterProductCustomAttribute as Filter;
11+
use Magento\Catalog\Model\FilterProductCustomAttribute as Filter;
1212

1313
class FilterCustomAttribute
1414
{

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@
3535
<type name="Magento\Catalog\Model\Product\Attribute\Repository">
3636
<plugin name="filterCustomAttribute" type="Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute" />
3737
</type>
38-
<type name="Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute">
39-
<arguments>
40-
<argument name="filter" xsi:type="object">Magento\CatalogInventory\Model\FilterCustomAttribute</argument>
41-
</arguments>
42-
</type>
4338
<type name="Magento\Catalog\Model\FilterProductCustomAttribute">
4439
<arguments>
4540
<argument name="blackList" xsi:type="array">
@@ -81,9 +76,6 @@
8176
</arguments>
8277
</type>
8378
<type name="Magento\Catalog\Model\Product">
84-
<arguments>
85-
<argument name="filter" xsi:type="object">Magento\Catalog\Model\FilterProductCustomAttribute</argument>
86-
</arguments>
8779
<plugin name="catalogInventoryAfterLoad" type="Magento\CatalogInventory\Model\Plugin\AfterProductLoad"/>
8880
</type>
8981
<type name="Magento\Catalog\Model\Product\Action">

0 commit comments

Comments
 (0)