Skip to content

Commit 356cd9b

Browse files
igrybkovle0n4eg
authored andcommitted
MAGETWO-69036: Lazy-loaders cause fatal errors in production mode on cloud
- Fix static tests
1 parent cc95af3 commit 356cd9b

File tree

10 files changed

+45
-21
lines changed

10 files changed

+45
-21
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ public function __construct(
109109
Js $jsHelper,
110110
DateFilter $dateFilter,
111111
LinkTypeProvider $linkTypeProvider = null,
112-
CustomOptionFactory $customOptionFactory,
113-
ProductLinkFactory $productLinkFactory,
114-
ProductRepository $productRepository,
115-
DateTime $dateTimeFilter
112+
CustomOptionFactory $customOptionFactory = null,
113+
ProductLinkFactory $productLinkFactory = null,
114+
ProductRepository $productRepository = null,
115+
DateTime $dateTimeFilter = null
116116
) {
117117
if (null === $linkTypeProvider) {
118118
$linkTypeProvider = ObjectManager::getInstance()->get(LinkTypeProvider::class);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class Repository implements \Magento\Catalog\Api\ProductCustomOptionRepositoryIn
5858
* @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
5959
* @param \Magento\Catalog\Model\ResourceModel\Product\Option $optionResource
6060
* @param Converter $converter
61+
* @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory
62+
* @param \Magento\Catalog\Model\ResourceModel\Product\Option\CollectionFactory $collectionFactory
6163
*/
6264
public function __construct(
6365
\Magento\Catalog\Api\ProductRepositoryInterface $productRepository,

app/code/Magento/Catalog/Model/ProductLink/Repository.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ class Repository implements \Magento\Catalog\Api\ProductLinkRepositoryInterface
8484
* @param LinksInitializer $linkInitializer
8585
* @param Management $linkManagement
8686
* @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor
87+
* @param ProductLinkInterfaceFactory $productLinkFactory
88+
* @param ProductLinkExtensionFactory $productLinkExtensionFactory
8789
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8890
*/
8991
public function __construct(

app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -703,19 +703,4 @@ public function getProductsPosition($category)
703703

704704
return $this->getConnection()->fetchPairs($select, $bind);
705705
}
706-
707-
/**
708-
* Get instance of CategoryFlatCollectionFactory
709-
*
710-
* @return CategoryFlatCollectionFactory
711-
*/
712-
private function getCategoryFlatCollectionFactory()
713-
{
714-
if (!$this->categoryFlatCollectionFactory instanceof CategoryFlatCollectionFactory) {
715-
$this->categoryFlatCollectionFactory = ObjectManager::getInstance()
716-
->get(CategoryFlatCollectionFactory::class);
717-
}
718-
719-
return $this->categoryFlatCollectionFactory;
720-
}
721706
}

app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,35 @@ class Cart extends \Magento\Customer\Controller\Adminhtml\Index
2626
*/
2727
private $quoteFactory;
2828

29+
/**
30+
* Cart constructor.
31+
* @param \Magento\Backend\App\Action\Context $context
32+
* @param \Magento\Framework\Registry $coreRegistry
33+
* @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
34+
* @param \Magento\Customer\Model\CustomerFactory $customerFactory
35+
* @param \Magento\Customer\Model\AddressFactory $addressFactory
36+
* @param \Magento\Customer\Model\Metadata\FormFactory $formFactory
37+
* @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
38+
* @param \Magento\Customer\Helper\View $viewHelper
39+
* @param \Magento\Framework\Math\Random $random
40+
* @param CustomerRepositoryInterface $customerRepository
41+
* @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter
42+
* @param Mapper $addressMapper
43+
* @param AccountManagementInterface $customerAccountManagement
44+
* @param AddressRepositoryInterface $addressRepository
45+
* @param CustomerInterfaceFactory $customerDataFactory
46+
* @param AddressInterfaceFactory $addressDataFactory
47+
* @param \Magento\Customer\Model\Customer\Mapper $customerMapper
48+
* @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor
49+
* @param DataObjectHelper $dataObjectHelper
50+
* @param ObjectFactory $objectFactory
51+
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
52+
* @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
53+
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
54+
* @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory
55+
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
56+
* @param QuoteFactory|null $quoteFactory
57+
*/
2958
public function __construct(
3059
\Magento\Backend\App\Action\Context $context,
3160
\Magento\Framework\Registry $coreRegistry,
@@ -87,7 +116,6 @@ public function __construct(
87116
$this->quoteFactory = $quoteFactory;
88117
}
89118

90-
91119
/**
92120
* Handle and then get cart grid contents
93121
*

app/code/Magento/Customer/Model/Metadata/Form/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class File extends AbstractData
7272
* @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $fileValidator
7373
* @param Filesystem $fileSystem
7474
* @param UploaderFactory $uploaderFactory
75+
* @param FileProcessorFactory|null $fileProcessorFactory
7576
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
76-
* @throws \RuntimeException
7777
*/
7878
public function __construct(
7979
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,

app/code/Magento/Directory/Model/Currency/Import/Webservicex.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Webservicex extends \Magento\Directory\Model\Currency\Import\AbstractImpor
3434
* @var \Magento\Framework\App\Config\ScopeConfigInterface
3535
*/
3636
private $scopeConfig;
37+
3738
/**
3839
* @var ZendClientFactory|null
3940
*/

app/code/Magento/Indexer/Console/Command/AbstractIndexerCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ abstract class AbstractIndexerCommand extends Command
2828
* @var ObjectManagerInterface
2929
*/
3030
private $objectManager;
31+
3132
/**
3233
* @var IndexerCollectionFactory|null
3334
*/

app/code/Magento/Indexer/Console/Command/AbstractIndexerManageCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ abstract class AbstractIndexerManageCommand extends AbstractIndexerCommand
2020
* Indexer name option
2121
*/
2222
const INPUT_KEY_INDEXERS = 'index';
23+
2324
/**
2425
* @var IndexerFactory|null
2526
*/

app/code/Magento/Quote/Model/QuoteRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
7171
*/
7272
private $loadHandler;
7373

74+
/**
75+
* @var QuoteCollectionFactory
76+
*/
7477
private $quoteCollectionFactory;
7578

7679
/**
@@ -79,6 +82,7 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
7982
* @param \Magento\Quote\Model\ResourceModel\Quote\Collection $quoteCollection
8083
* @param \Magento\Quote\Api\Data\CartSearchResultsInterfaceFactory $searchResultsDataFactory
8184
* @param JoinProcessorInterface $extensionAttributesJoinProcessor
85+
* @param QuoteCollectionFactory|null $quoteCollectionFactory
8286
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
8387
*/
8488
public function __construct(

0 commit comments

Comments
 (0)