77namespace Magento \CatalogDataExporter \Plugin \Eav \Attribute ;
88
99use Magento \Catalog \Api \Data \ProductInterface ;
10+ use Magento \Catalog \Model \ResourceModel \Eav \Attribute ;
1011use Magento \CatalogDataExporter \Model \Indexer \IndexInvalidationManager ;
1112use Magento \Framework \App \ResourceConnection ;
1213use Magento \Framework \EntityManager \MetadataPool ;
1314use Magento \Framework \Indexer \IndexerRegistry ;
1415use Magento \Store \Model \Store ;
15- use Magento \DataExporter \Model \Logging \CommerceDataExportLoggerInterface as LoggerInterface ;
16+ use Magento \DataExporter \Model \Logging \CommerceDataExportLoggerInterface ;
1617
1718/**
1819 * MySQL trigger does not call in case of cascade deleting (by FK), as a result product not re-indexed when product
@@ -27,51 +28,28 @@ class ProductAttributeDelete
2728{
2829 private const MAX_PRODUCTS_FOR_INSERT = 10000 ;
2930
30- /**
31- * @var ResourceConnection
32- */
33- private $ resourceConnection ;
34-
35- /**
36- * @var MetadataPool
37- */
38- private $ metadataPool ;
39-
40- /**
41- * @var IndexInvalidationManager
42- */
43- private $ invalidationManager ;
44-
45- /**
46- * @var IndexerRegistry
47- */
48- private $ indexerRegistry ;
49-
50- /**
51- * @var LoggerInterface
52- */
53- private $ logger ;
54-
55- /**
56- * @var int
57- */
58- private $ maxProductsPerInsert ;
31+ private ResourceConnection $ resourceConnection ;
32+ private MetadataPool $ metadataPool ;
33+ private IndexInvalidationManager $ invalidationManager ;
34+ private IndexerRegistry $ indexerRegistry ;
35+ private CommerceDataExportLoggerInterface $ logger ;
36+ private int $ maxProductsPerInsert ;
5937
6038 /**
6139 * @param ResourceConnection $resourceConnection
6240 * @param MetadataPool $metadataPool
6341 * @param IndexInvalidationManager $invalidationManager
6442 * @param IndexerRegistry $indexerRegistry
65- * @param LoggerInterface $logger
43+ * @param CommerceDataExportLoggerInterface $logger
6644 * @param int $maxProductsPerInsert
6745 */
6846 public function __construct (
6947 ResourceConnection $ resourceConnection ,
7048 MetadataPool $ metadataPool ,
7149 IndexInvalidationManager $ invalidationManager ,
7250 IndexerRegistry $ indexerRegistry ,
73- LoggerInterface $ logger ,
74- $ maxProductsPerInsert = self ::MAX_PRODUCTS_FOR_INSERT
51+ CommerceDataExportLoggerInterface $ logger ,
52+ int $ maxProductsPerInsert = self ::MAX_PRODUCTS_FOR_INSERT
7553 ) {
7654 $ this ->resourceConnection = $ resourceConnection ;
7755 $ this ->metadataPool = $ metadataPool ;
@@ -82,10 +60,10 @@ public function __construct(
8260 }
8361
8462 /**
85- * @param \Magento\Catalog\Model\ResourceModel\Eav\ Attribute $attribute
63+ * @param Attribute $attribute
8664 */
8765 public function beforeDelete (
88- \ Magento \ Catalog \ Model \ ResourceModel \ Eav \ Attribute $ attribute
66+ Attribute $ attribute
8967 ) {
9068 $ indexer = $ this ->indexerRegistry ->get ('catalog_data_exporter_products ' );
9169 if (!$ indexer ->isScheduled ()) {
0 commit comments