Skip to content
Snippets Groups Projects
Commit 93c5fcc4 authored by Mike Potter's avatar Mike Potter Committed by Mike Potter
Browse files

Issue #2697007 by mpotter: Remove empty features

parent 6b59cd70
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,19 @@ class FeaturesAssigner implements FeaturesAssignerInterface {
return $enabled;
}
/**
* Clean up the package list after all config has been assigned
*/
protected function cleanup() {
$packages = $this->featuresManager->getPackages();
foreach ($packages as $index => $package) {
if ($package->getStatus() === FeaturesManagerInterface::STATUS_NO_EXPORT && empty($package->getConfig()) && empty($package->getConfigOrig())) {
unset($packages[$index]);
}
}
$this->featuresManager->setPackages($packages);
}
/**
* {@inheritdoc}
*/
......@@ -145,6 +158,7 @@ class FeaturesAssigner implements FeaturesAssignerInterface {
foreach ($this->getEnabledAssigners() as $method_id => $info) {
$this->applyAssignmentMethod($method_id, $force);
}
$this->cleanup();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment