phpstorm - Cleanup on uninstall
authorTim Otten <totten@civicrm.org>
Fri, 25 Aug 2023 22:56:28 +0000 (15:56 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 25 Aug 2023 23:35:58 +0000 (16:35 -0700)
tools/extensions/phpstorm/phpstorm.php

index d778d90eaac9e3467b8a8505358c1a730b60980d..e833d24d2fe5bfcae92f9511ada63501243b41c6 100644 (file)
@@ -32,3 +32,10 @@ function phpstorm_metadata_dir(): string {
 function phpstorm_civicrm_container(\Symfony\Component\DependencyInjection\ContainerBuilder $container) {
   $container->addCompilerPass(new \Civi\PhpStorm\PhpStormCompilePass(), PassConfig::TYPE_AFTER_REMOVING, 2000);
 }
+
+function phpstorm_civicrm_uninstall() {
+  $dir = phpstorm_metadata_dir();
+  if (file_exists($dir)) {
+    CRM_Utils_File::cleanDir($dir, TRUE);
+  }
+}