Skip to content

Commit 5fbfe77

Browse files
committed
ENGCOM-3502: Constructor integrity fix.
1 parent 3f025c8 commit 5fbfe77

File tree

6 files changed

+74
-6
lines changed

6 files changed

+74
-6
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
*/
66
namespace Magento\Catalog\Model\ResourceModel\Product\Compare\Item;
77

8+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
9+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
810
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
911
use Magento\Framework\EntityManager\MetadataPool;
12+
use Magento\Framework\Indexer\DimensionFactory;
1013
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1114

1215
/**
@@ -79,9 +82,11 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
7982
* @param \Magento\Catalog\Model\ResourceModel\Product\Compare\Item $catalogProductCompareItem
8083
* @param \Magento\Catalog\Helper\Product\Compare $catalogProductCompare
8184
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
82-
*
8385
* @param ProductLimitationFactory|null $productLimitationFactory
8486
* @param MetadataPool|null $metadataPool
87+
* @param TableMaintainer|null $tableMaintainer
88+
* @param PriceTableResolver|null $priceTableResolver
89+
* @param DimensionFactory|null $dimensionFactory
8590
* @param ResourceModelPoolInterface|null $resourceModelPool
8691
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8792
*/
@@ -110,6 +115,9 @@ public function __construct(
110115
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
111116
ProductLimitationFactory $productLimitationFactory = null,
112117
MetadataPool $metadataPool = null,
118+
TableMaintainer $tableMaintainer = null,
119+
PriceTableResolver $priceTableResolver = null,
120+
DimensionFactory $dimensionFactory = null,
113121
ResourceModelPoolInterface $resourceModelPool = null
114122
) {
115123
$this->_catalogProductCompareItem = $catalogProductCompareItem;
@@ -137,6 +145,9 @@ public function __construct(
137145
$connection,
138146
$productLimitationFactory,
139147
$metadataPool,
148+
$tableMaintainer,
149+
$priceTableResolver,
150+
$dimensionFactory,
140151
$resourceModelPool
141152
);
142153
}

app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
namespace Magento\CatalogSearch\Model\ResourceModel\Search;
88

9+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
10+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
911
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
1012
use Magento\Framework\EntityManager\MetadataPool;
13+
use Magento\Framework\Indexer\DimensionFactory;
1114
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1215

1316
/**
@@ -64,9 +67,11 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
6467
* @param \Magento\Customer\Api\GroupManagementInterface $groupManagement
6568
* @param \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory
6669
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
67-
*
6870
* @param ProductLimitationFactory|null $productLimitationFactory
6971
* @param MetadataPool|null $metadataPool
72+
* @param TableMaintainer|null $tableMaintainer
73+
* @param PriceTableResolver|null $priceTableResolver
74+
* @param DimensionFactory|null $dimensionFactory
7075
* @param ResourceModelPoolInterface|null $resourceModelPool
7176
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
7277
*/
@@ -94,6 +99,9 @@ public function __construct(
9499
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
95100
ProductLimitationFactory $productLimitationFactory = null,
96101
MetadataPool $metadataPool = null,
102+
TableMaintainer $tableMaintainer = null,
103+
PriceTableResolver $priceTableResolver = null,
104+
DimensionFactory $dimensionFactory = null,
97105
ResourceModelPoolInterface $resourceModelPool = null
98106
) {
99107
$this->_attributeCollectionFactory = $attributeCollectionFactory;
@@ -120,6 +128,9 @@ public function __construct(
120128
$connection,
121129
$productLimitationFactory,
122130
$metadataPool,
131+
$tableMaintainer,
132+
$priceTableResolver,
133+
$dimensionFactory,
123134
$resourceModelPool
124135
);
125136
}

app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Type/Grouped/AssociatedProductsCollection.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
*/
88
namespace Magento\GroupedProduct\Model\ResourceModel\Product\Type\Grouped;
99

10+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
11+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
1012
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
1113
use Magento\Framework\EntityManager\MetadataPool;
14+
use Magento\Framework\Indexer\DimensionFactory;
1215
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1316

1417
/**
@@ -60,6 +63,9 @@ class AssociatedProductsCollection extends \Magento\Catalog\Model\ResourceModel\
6063
*
6164
* @param ProductLimitationFactory|null $productLimitationFactory
6265
* @param MetadataPool|null $metadataPool
66+
* @param TableMaintainer|null $tableMaintainer
67+
* @param PriceTableResolver|null $priceTableResolver
68+
* @param DimensionFactory|null $dimensionFactory
6369
* @param ResourceModelPoolInterface|null $resourceModelPool
6470
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6571
*/
@@ -88,6 +94,9 @@ public function __construct(
8894
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
8995
ProductLimitationFactory $productLimitationFactory = null,
9096
MetadataPool $metadataPool = null,
97+
TableMaintainer $tableMaintainer = null,
98+
PriceTableResolver $priceTableResolver = null,
99+
DimensionFactory $dimensionFactory = null,
91100
ResourceModelPoolInterface $resourceModelPool = null
92101
) {
93102
$this->_coreRegistry = $coreRegistry;
@@ -115,6 +124,9 @@ public function __construct(
115124
$connection,
116125
$productLimitationFactory,
117126
$metadataPool,
127+
$tableMaintainer,
128+
$priceTableResolver,
129+
$dimensionFactory,
118130
$resourceModelPool
119131
);
120132
}

app/code/Magento/Reports/Model/ResourceModel/Product/Index/Collection/AbstractCollection.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
*/
1010
namespace Magento\Reports\Model\ResourceModel\Product\Index\Collection;
1111

12+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
13+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
1214
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
1315
use Magento\Framework\EntityManager\MetadataPool;
16+
use Magento\Framework\Indexer\DimensionFactory;
1417
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1518

1619
/**
@@ -57,9 +60,11 @@ abstract class AbstractCollection extends \Magento\Catalog\Model\ResourceModel\P
5760
* @param \Magento\Customer\Api\GroupManagementInterface $groupManagement
5861
* @param \Magento\Customer\Model\Visitor $customerVisitor
5962
* @param mixed $connection
60-
*
6163
* @param ProductLimitationFactory|null $productLimitationFactory
6264
* @param MetadataPool|null $metadataPool
65+
* @param TableMaintainer|null $tableMaintainer
66+
* @param PriceTableResolver|null $priceTableResolver
67+
* @param DimensionFactory|null $dimensionFactory
6368
* @param ResourceModelPoolInterface|null $resourceModelPool
6469
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6570
*/
@@ -87,6 +92,9 @@ public function __construct(
8792
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
8893
ProductLimitationFactory $productLimitationFactory = null,
8994
MetadataPool $metadataPool = null,
95+
TableMaintainer $tableMaintainer = null,
96+
PriceTableResolver $priceTableResolver = null,
97+
DimensionFactory $dimensionFactory = null,
9098
ResourceModelPoolInterface $resourceModelPool = null
9199
) {
92100
parent::__construct(
@@ -112,6 +120,9 @@ public function __construct(
112120
$connection,
113121
$productLimitationFactory,
114122
$metadataPool,
123+
$tableMaintainer,
124+
$priceTableResolver,
125+
$dimensionFactory,
115126
$resourceModelPool
116127
);
117128
$this->_customerVisitor = $customerVisitor;

app/code/Magento/Reports/Model/ResourceModel/Product/Lowstock/Collection.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
*/
1010
namespace Magento\Reports\Model\ResourceModel\Product\Lowstock;
1111

12+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
13+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
1214
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
1315
use Magento\Framework\EntityManager\MetadataPool;
1416
use Magento\Framework\Exception\LocalizedException;
17+
use Magento\Framework\Indexer\DimensionFactory;
1518
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1619

1720
/**
@@ -81,10 +84,13 @@ class Collection extends \Magento\Reports\Model\ResourceModel\Product\Collection
8184
* @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
8285
* @param \Magento\CatalogInventory\Model\ResourceModel\Stock\Item $itemResource
8386
* @param \Magento\Framework\DB\Adapter\AdapterInterface|null $connection
84-
*
8587
* @param ProductLimitationFactory|null $productLimitationFactory
8688
* @param MetadataPool|null $metadataPool
89+
* @param TableMaintainer|null $tableMaintainer
90+
* @param PriceTableResolver|null $priceTableResolver
91+
* @param DimensionFactory|null $dimensionFactory
8792
* @param ResourceModelPoolInterface|null $resourceModelPool
93+
* @throws LocalizedException
8894
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8995
*/
9096
public function __construct(
@@ -117,6 +123,9 @@ public function __construct(
117123
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
118124
ProductLimitationFactory $productLimitationFactory = null,
119125
MetadataPool $metadataPool = null,
126+
TableMaintainer $tableMaintainer = null,
127+
PriceTableResolver $priceTableResolver = null,
128+
DimensionFactory $dimensionFactory = null,
120129
ResourceModelPoolInterface $resourceModelPool = null
121130
) {
122131
parent::__construct(
@@ -146,6 +155,9 @@ public function __construct(
146155
$connection,
147156
$productLimitationFactory,
148157
$metadataPool,
158+
$tableMaintainer,
159+
$priceTableResolver,
160+
$dimensionFactory,
149161
$resourceModelPool
150162
);
151163
$this->stockRegistry = $stockRegistry;

app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
*/
66
namespace Magento\Review\Model\ResourceModel\Review\Product;
77

8+
use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
9+
use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver;
10+
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
811
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
912
use Magento\Framework\DB\Select;
1013
use Magento\Framework\EntityManager\MetadataPool;
11-
use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory;
14+
use Magento\Framework\Indexer\DimensionFactory;
1215
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
1316

1417
/**
@@ -89,7 +92,9 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
8992
* @param \Magento\Framework\DB\Adapter\AdapterInterface|null $connection
9093
* @param ProductLimitationFactory|null $productLimitationFactory
9194
* @param MetadataPool|null $metadataPool
92-
*
95+
* @param TableMaintainer|null $tableMaintainer
96+
* @param PriceTableResolver|null $priceTableResolver
97+
* @param DimensionFactory|null $dimensionFactory
9398
* @param ResourceModelPoolInterface|null $resourceModelPool
9499
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
95100
*/
@@ -118,6 +123,9 @@ public function __construct(
118123
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
119124
ProductLimitationFactory $productLimitationFactory = null,
120125
MetadataPool $metadataPool = null,
126+
TableMaintainer $tableMaintainer = null,
127+
PriceTableResolver $priceTableResolver = null,
128+
DimensionFactory $dimensionFactory = null,
121129
ResourceModelPoolInterface $resourceModelPool = null
122130
) {
123131
$this->_ratingFactory = $ratingFactory;
@@ -145,6 +153,9 @@ public function __construct(
145153
$connection,
146154
$productLimitationFactory,
147155
$metadataPool,
156+
$tableMaintainer,
157+
$priceTableResolver,
158+
$dimensionFactory,
148159
$resourceModelPool
149160
);
150161
}

0 commit comments

Comments
 (0)