File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
app/code/Magento/Catalog/Model/Indexer/Category/Product
lib/internal/Magento/Framework/DB/Query Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -113,18 +113,20 @@ abstract class AbstractAction
113
113
* @param ResourceConnection $resource
114
114
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
115
115
* @param \Magento\Catalog\Model\Config $config
116
+ * @param QueryGenerator $queryGenerator
116
117
*/
117
118
public function __construct (
118
119
\Magento \Framework \App \ResourceConnection $ resource ,
119
120
\Magento \Store \Model \StoreManagerInterface $ storeManager ,
120
121
\Magento \Catalog \Model \Config $ config ,
121
- QueryGenerator $ queryGenerator
122
+ QueryGenerator $ queryGenerator = null
122
123
) {
123
124
$ this ->resource = $ resource ;
124
125
$ this ->connection = $ resource ->getConnection ();
125
126
$ this ->storeManager = $ storeManager ;
126
127
$ this ->config = $ config ;
127
- $ this ->queryGenerator = $ queryGenerator ;
128
+ $ this ->queryGenerator = $ queryGenerator ?: \Magento \Framework \App \ObjectManager::getInstance ()
129
+ ->get (QueryGenerator::class);
128
130
}
129
131
130
132
/**
Original file line number Diff line number Diff line change @@ -30,10 +30,11 @@ class Generator
30
30
*/
31
31
public function __construct (
32
32
BatchIteratorFactory $ iteratorFactory ,
33
- BatchRangeIteratorFactory $ rangeIteratorFactory
33
+ BatchRangeIteratorFactory $ rangeIteratorFactory = null
34
34
) {
35
35
$ this ->iteratorFactory = $ iteratorFactory ;
36
- $ this ->rangeIteratorFactory = $ rangeIteratorFactory ;
36
+ $ this ->rangeIteratorFactory = $ rangeIteratorFactory ?: \Magento \Framework \App \ObjectManager::getInstance ()
37
+ ->get (\Magento \Framework \DB \Query \BatchRangeIteratorFactory::class);
37
38
}
38
39
39
40
/**
You can’t perform that action at this time.
0 commit comments