I have a Feature that only contains roles and nothing else.
The roles are exported without the permissions per #2383439: User permission handling, which is absolutely fine.
However, the module gets loads of dependencies added, which a definitely not necessary just to create the role. They appear to be all the modules that provide all the permissions used on these roles, even though the permissions aren't actually included in the Feature!
The code that's stripping the permissions, should also strip the dependency information (assuming that's what's actually happening)
Issue fork features-2912545
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nedjoThanks for the report, a patch would be welcome.
Comment #3
nedjoI'm having trouble reproducing this.
I've configured a role with several permissions. Prior to exporting to Features, it looks like this:
There are no dependencies listed. If I add only that role to a feature, only a dependency on 'user' is added to the
.info.yml
file. Maybe core's dependency assignment has changed?Comment #4
Chris Burge CreditAttribution: Chris Burge at University of Nebraska commentedThis is reproducible. Steps to reproduce:
Note that the role's dependencies are being exported.
If the role is stripped of its permissions, then it can't have dependencies; hence the bug.
Comment #6
nedjok, makes sense. I've added a commit. I'm following what was introduced with permissions in #2757611: Permission export disabled, but import is not, unsetting dependencies rather than emptying. Manual testing would be welcome.