File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/MagentoHackathon/Composer/Magento Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,12 @@ public function onPackageUnistall(\Composer\Installer\PackageEvent $event)
129129 $ deployStrategy = $ this ->installer ->getDeployStrategy ($ package );
130130 $ deployStrategy ->rmdirRecursive ($ packageInstallationPath . $ ds . $ libPath );
131131 $ deployStrategy ->rmdirRecursive ($ packageInstallationPath . $ ds . $ magentoPackagePath );
132+
133+ // Force regeneration of var/di, var/cache, var/generation on next object manager invocation
134+ if (file_exists ($ this ->installer ->getTargetDir () . $ this ->varFolder )) {
135+ $ filename = $ this ->installer ->getTargetDir () . $ this ->varFolder . $ this ->regenerate ;
136+ touch ($ filename );
137+ }
132138 }
133139
134140 /**
@@ -155,6 +161,8 @@ public function onNewCodeEvent(\Composer\Script\Event $event)
155161 $ this ->deployManager ->doDeploy ();
156162 $ this ->deployLibraries ();
157163 $ this ->saveVendorDirPath ($ event ->getComposer ());
164+
165+ // Force regeneration of var/di, var/cache, var/generation on next object manager invocation
158166 if (file_exists ($ this ->installer ->getTargetDir () . $ this ->varFolder )) {
159167 $ filename = $ this ->installer ->getTargetDir () . $ this ->varFolder . $ this ->regenerate ;
160168 touch ($ filename );
You can’t perform that action at this time.
0 commit comments