Closed (works as designed)
Project:
Features
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2009 at 17:48 UTC
Updated:
22 Aug 2012 at 20:44 UTC
It would be wonderful if Features module just exported straight-up, run-of-the mill, stand-alone modules, and Features module integration were optional if you just wanted the update/export/etc. functionality. I haven't looked too in-depth, but I noticed for example that it's Features module, not My Crazy Feature module that's implementing hook_access(), hook_form(), etc.
I thought that this module might be a great supplement to http://drupal.org/project/module_builder but introducing that extra dependency isn't very nice, esp. for D7.
Comments
Comment #1
amitaibuAFAIK Featuers is added only when Features is the implementing module (in cases such as user permissions). If you will export Just Views/ Rules, I don't think it includes Features.
Comment #2
yhahn commentedThe short here is that Features doesn't add itself as a dependency unless it is providing the export/rebuild integration itself for components that otherwise would not be exportable (e.g. user permissions).
There is one exception to this, namely the node type component. This is because we cannot export into
hook_node_info()using the'node'key (which gets special treatment). Instead we use Features with wrappers around the defaulthook_access(),hook_form(), etc.Why don't we write
hook_access(),hook_form(), etc. with default behaviors to the new feature module? This is basically a design decision -- features handles exportables, buthook_access()andhook_form()are not exported settings. They act a lot more like handlers, or pluggable behaviors in the node system. So they can not really be programmatically written & updated like other features components.Comment #3
mcpuddin commentedFor functions like hook_access, would it be too farfetched to ask for the features_access function to allow some extendability? For example, it is impossible to take control of hook_access for a module exported with features.
For now, I'll create a new module to do what I need to do.
James
Comment #4
hefox commentedIf you change the module in hook_node_info, newer versions of features should preserve the module key, then you can use node hooks (but remember to implement the required hooks; guide I wrote on it a while ago on doing it, just updated to reflect that features does keep the module key, http://drupal.foxinbox.org/drupal/guides/custom-access-checks-hookaccess...).
Comment #5
Grayside commented#3: Something like this?
EDIT: Went over this again, hefox makes sense. It's counter-intuitive that Features won't update over the module element, but if that's the case there's no reason for this overhead.
Comment #6
mpotter commentedClosing this for lack of activity. Pure-Features (like Views, ctools exportable) already do not require Features module. "faux" exportables such as Fields require the routines in the Features module to support the hooks for making the features work, so there is no way to remove that dependency.