11
11
use Algolia \AlgoliaSearch \Service \StoreNameFetcher ;
12
12
use Algolia \AlgoliaSearch \Validator \VirtualReplicaValidatorFactory ;
13
13
use Magento \Framework \App \Config \ConfigResource \ConfigInterface ;
14
+ use Magento \Framework \App \Config \ReinitableConfigInterface ;
14
15
use Magento \Framework \App \Config \ScopeConfigInterface ;
15
16
use Magento \Framework \App \Config \Storage \WriterInterface ;
16
17
use Magento \Framework \Exception \LocalizedException ;
@@ -28,7 +29,7 @@ public function __construct(
28
29
protected ModuleDataSetupInterface $ moduleDataSetup ,
29
30
protected WriterInterface $ configWriter ,
30
31
protected ConfigInterface $ config ,
31
- protected ScopeConfigInterface $ scopeConfig ,
32
+ protected ReinitableConfigInterface $ scopeConfig ,
32
33
protected ConfigHelper $ configHelper ,
33
34
protected ConfigChecker $ configChecker ,
34
35
protected ReplicaManagerInterface $ replicaManager ,
@@ -49,6 +50,8 @@ public function apply(): PatchInterface
49
50
50
51
$ this ->configChecker ->checkAndApplyAllScopes (ConfigHelper::LEGACY_USE_VIRTUAL_REPLICA_ENABLED , [$ this , 'migrateSetting ' ]);
51
52
53
+ $ this ->scopeConfig ->reinit ();
54
+
52
55
$ this ->moduleDataSetup ->getConnection ()->endSetup ();
53
56
54
57
return $ this ;
0 commit comments