Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
features-3480210
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
features-3480210
Commits
93c5fcc4
Commit
93c5fcc4
authored
8 years ago
by
Mike Potter
Committed by
Mike Potter
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2697007
by mpotter: Remove empty features
parent
6b59cd70
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/FeaturesAssigner.php
+14
-0
14 additions, 0 deletions
src/FeaturesAssigner.php
with
14 additions
and
0 deletions
src/FeaturesAssigner.php
+
14
−
0
View file @
93c5fcc4
...
...
@@ -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
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment