File tree Expand file tree Collapse file tree 3 files changed +70
-16
lines changed Expand file tree Collapse file tree 3 files changed +70
-16
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,21 @@ class MigrateConversionAnalyticsModePatch implements DataPatchInterface
17
17
{
18
18
public function __construct (
19
19
protected ModuleDataSetupInterface $ moduleDataSetup ,
20
- protected WriterInterface $ configWriter ,
21
- protected ConfigInterface $ config ,
22
- protected ScopeConfigInterface $ scopeConfig ,
23
- protected ConfigChecker $ configChecker ,
24
- protected StoreManagerInterface $ storeManager
25
- ) {}
20
+ protected WriterInterface $ configWriter ,
21
+ protected ConfigInterface $ config ,
22
+ protected ScopeConfigInterface $ scopeConfig ,
23
+ protected ConfigChecker $ configChecker ,
24
+ protected StoreManagerInterface $ storeManager
25
+ )
26
+ {}
27
+
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ public static function getDependencies (): array
32
+ {
33
+ return [];
34
+ }
26
35
27
36
/**
28
37
* @inheritDoc
@@ -62,14 +71,6 @@ public function migrateSetting(string $scope = ScopeConfigInterface::SCOPE_TYPE_
62
71
}
63
72
}
64
73
65
- /**
66
- * @inheritDoc
67
- */
68
- public static function getDependencies (): array
69
- {
70
- return [];
71
- }
72
-
73
74
/**
74
75
* @inheritDoc
75
76
*/
Original file line number Diff line number Diff line change 8
8
9
9
class MigrateInstantSearchConfigPatch implements DataPatchInterface
10
10
{
11
-
12
-
13
11
public function __construct (
14
12
protected ModuleDataSetupInterface $ moduleDataSetup ,
15
13
) {}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Algolia \AlgoliaSearch \Setup \Patch \Data ;
4
+
5
+ use Algolia \AlgoliaSearch \Api \Product \ReplicaManagerInterface ;
6
+ use Algolia \AlgoliaSearch \Helper \Configuration \ConfigChecker ;
7
+ use Magento \Framework \App \Config \ConfigResource \ConfigInterface ;
8
+ use Magento \Framework \App \Config \ScopeConfigInterface ;
9
+ use Magento \Framework \App \Config \Storage \WriterInterface ;
10
+ use Magento \Framework \Setup \ModuleDataSetupInterface ;
11
+ use Magento \Framework \Setup \Patch \DataPatchInterface ;
12
+ use Magento \Framework \Setup \Patch \PatchInterface ;
13
+
14
+ class MigrateVirtualReplicaConfigPatch implements DataPatchInterface
15
+ {
16
+ public function __construct (
17
+ protected ModuleDataSetupInterface $ moduleDataSetup ,
18
+ protected WriterInterface $ configWriter ,
19
+ protected ConfigInterface $ config ,
20
+ protected ScopeConfigInterface $ scopeConfig ,
21
+ protected ConfigChecker $ configChecker ,
22
+ protected ReplicaManagerInterface $ replicaManager
23
+ )
24
+ {}
25
+
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ public static function getDependencies ()
30
+ {
31
+ return [];
32
+ }
33
+
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ public function apply (): PatchInterface
38
+ {
39
+ $ this ->moduleDataSetup ->getConnection ()->startSetup ();
40
+
41
+ // do stuff
42
+
43
+ $ this ->moduleDataSetup ->getConnection ()->endSetup ();
44
+
45
+ return $ this ;
46
+ }
47
+
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ public function getAliases ()
52
+ {
53
+ return [];
54
+ }
55
+ }
You can’t perform that action at this time.
0 commit comments