File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
setup/src/Magento/Setup/Model Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -321,9 +321,7 @@ public function __construct(
321
321
$ this ->sampleDataState = $ sampleDataState ;
322
322
$ this ->componentRegistrar = $ componentRegistrar ;
323
323
$ this ->phpReadinessCheck = $ phpReadinessCheck ;
324
- $ this ->declarationInstaller = $ declarationInstaller ?: $ this ->objectManagerProvider ->get ()->get (
325
- DeclarationInstaller::class
326
- );
324
+
327
325
$ this ->schemaPersistor = $ this ->objectManagerProvider ->get ()->get (SchemaPersistor::class);
328
326
}
329
327
@@ -385,6 +383,21 @@ public function install($request)
385
383
}
386
384
}
387
385
386
+ /**
387
+ * Get declaration installer. For upgrade process it must be created after deployment config update.
388
+ *
389
+ * @return DeclarationInstaller
390
+ */
391
+ private function getDeclarationInstaller ()
392
+ {
393
+ if (!$ this ->declarationInstaller ) {
394
+ $ this ->declarationInstaller = $ this ->objectManagerProvider ->get ()->get (
395
+ DeclarationInstaller::class
396
+ );
397
+ }
398
+ return $ this ->declarationInstaller ;
399
+ }
400
+
388
401
/**
389
402
* Writes installation date to the configuration
390
403
*
@@ -794,7 +807,7 @@ private function setupFlagTable(
794
807
*/
795
808
public function declarativeInstallSchema (array $ request )
796
809
{
797
- $ this ->declarationInstaller ->installSchema ($ request );
810
+ $ this ->getDeclarationInstaller () ->installSchema ($ request );
798
811
}
799
812
800
813
/**
You can’t perform that action at this time.
0 commit comments