@@ -559,6 +559,39 @@ public function install($cleanup)
559559 array_merge ([BP . '/bin/magento ' ], array_values ($ installParams ))
560560 );
561561
562+ $ this ->runPostInstallCommands ();
563+
564+ // enable only specified list of caches
565+ $ initParamsQuery = $ this ->getInitParamsQuery ();
566+ $ this ->_shell ->execute (
567+ PHP_BINARY . ' -f %s cache:disable -vvv --bootstrap=%s ' ,
568+ [BP . '/bin/magento ' , $ initParamsQuery ]
569+ );
570+ $ this ->_shell ->execute (
571+ PHP_BINARY . ' -f %s cache:enable -vvv %s %s %s %s --bootstrap=%s ' ,
572+ [
573+ BP . '/bin/magento ' ,
574+ \Magento \Framework \App \Cache \Type \Config::TYPE_IDENTIFIER ,
575+ \Magento \Framework \App \Cache \Type \Layout::TYPE_IDENTIFIER ,
576+ \Magento \Framework \App \Cache \Type \Translate::TYPE_IDENTIFIER ,
577+ \Magento \Eav \Model \Cache \Type::TYPE_IDENTIFIER ,
578+ $ initParamsQuery ,
579+ ]
580+ );
581+
582+ // right after a clean installation, store DB dump for future reuse in tests or running the test suite again
583+ if (!$ db ->isDbDumpExists () && $ this ->dumpDb ) {
584+ $ this ->getDbInstance ()->storeDbDump ();
585+ }
586+ }
587+
588+ /**
589+ * Run commands after installation configured in post-install-setup-command-config.php
590+ *
591+ * @throws \Magento\Framework\Exception\LocalizedException
592+ */
593+ protected function runPostInstallCommands ()
594+ {
562595 // run post-install setup commands
563596 $ postInstallSetupCommands = $ this ->getPostInstallSetupCommands ();
564597
@@ -595,29 +628,6 @@ public function install($cleanup)
595628 ),
596629 );
597630 }
598-
599- // enable only specified list of caches
600- $ initParamsQuery = $ this ->getInitParamsQuery ();
601- $ this ->_shell ->execute (
602- PHP_BINARY . ' -f %s cache:disable -vvv --bootstrap=%s ' ,
603- [BP . '/bin/magento ' , $ initParamsQuery ]
604- );
605- $ this ->_shell ->execute (
606- PHP_BINARY . ' -f %s cache:enable -vvv %s %s %s %s --bootstrap=%s ' ,
607- [
608- BP . '/bin/magento ' ,
609- \Magento \Framework \App \Cache \Type \Config::TYPE_IDENTIFIER ,
610- \Magento \Framework \App \Cache \Type \Layout::TYPE_IDENTIFIER ,
611- \Magento \Framework \App \Cache \Type \Translate::TYPE_IDENTIFIER ,
612- \Magento \Eav \Model \Cache \Type::TYPE_IDENTIFIER ,
613- $ initParamsQuery ,
614- ]
615- );
616-
617- // right after a clean installation, store DB dump for future reuse in tests or running the test suite again
618- if (!$ db ->isDbDumpExists () && $ this ->dumpDb ) {
619- $ this ->getDbInstance ()->storeDbDump ();
620- }
621631 }
622632
623633 /**
0 commit comments