Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In our hosting-features registry, we cannot currently differentiate between a module being disabled, and a module being absent. If we instead used the feature name for the key, and the value was a simple toggle, we'd be able to do:
$features = drush_get_option('hosting_features', array());
if (array_key_exists('this_feature', $features)) {
return $features['this_feature'];
}
else {
// react to missing feature...
}
Alternatively, if the value for an enabled feature was set to the feature name (instead of '1' or TRUE), our current in_array()'s would still work too.
Comments
Comment #1
ergonlogicI'm convinced that we need to be able to differentiate between something being 'off' in the front-end vs. 'absent'. only 'off' should stop the loading of commandfiles, otherwise our back-end has a dependency on the front-end.
Comment #2
ergonlogicFixed in 82eead9.