/** * @Route /genbundle/delete */ public function deleteBundleAction($request) { $name = $request->post('name'); $sp = $this->app->getConfigurationLoader()->getBundlesSpecifications(); $vendor = str_replace($name, '', $sp[$name]['location']); $this->eliminarDir($sp[$name]['location']); $files = new ItemList(glob($vendor . "*")); if ($files->isEmty()) { $this->eliminarDir($vendor); } $this->app->getConfigurationLoader()->unRegisterBundle($sp[$name]['name']); /** * Cant call force load here, the Aspect Kernel has a problem with removed bundles * instead perform a save operation with cache */ $this->app->getConfigurationLoader()->getCache()->setDirty(); $this->app->getConfigurationLoader()->getCache()->save(); return $this->show("Bundle {$name} deleted"); }