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.
Now that we have a solution for #2098389: subdirs kicks in even when subdirs module is disabled. we need that in more modules.
Lets investigate core and contrib.
I know hosting_site_git is one such contrib.
And we should probably document this.... provision.api.php? community site?
Comment | File | Size | Author |
---|---|---|---|
#6 | hostmaster.documentation.2099889-6.patch | 591 bytes | helmo |
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedI think this is mostly a documentation task for core - unless I am missing something, most existing modules in core use some kind of toggle from the frontend already and don't enable themselves by mistake.
So yes, community site and api.php.
Comment #2
ergonlogicFor 7.x-3.x, we should probably evaluate the existing toggles used in core, and consider switching to the hook_drush_load() method where appropriate. Since it'll mean fewer files loaded and hooks fired on each and every invocation of Drush, it should result in a smaller memory footprint and better performance.
Comment #3
anarcat CreditAttribution: anarcat commentedagreed.
Comment #4
ergonlogicIt looks like hooks in *.provision.inc files still get fired regardless of hook_drush_load(). After a quick grep through provision, I couldn't see where these are being auto-included. Is Drush just including *.inc in the root of Drush commands?
Moving these files into an includes/ directory and then explicitly including them into the main commandfile makes them respect the results of hook_drush_load().
Comment #5
anarcat CreditAttribution: anarcat commentedthis is based on the engine system.
example, for install:
I am not sure how migrate is fired, but I assume there is something similar.
Comment #6
helmo CreditAttribution: helmo commentedHere's a suggestion for provision.api.php.
And I've added http://community.aegirproject.org/dev-cheat-sheet#Enablingdisabling_drus...
Comment #7
helmo CreditAttribution: helmo commentedAnd a follow up for provision_tasks_extra in: #2106435: Check hosting_features in _drush_load hook
Comment #8
anarcat CreditAttribution: anarcat commentedthat seems like a good idea.
Comment #9
ergonlogicSince we need to #2102341: Differentiate between a feature being disabled vs absent, this'll end up having to look more like:
Comment #10
helmo CreditAttribution: helmo commented@ergonlogic: I had missed that issue.
To improve the DX we could replace 'hook' with a variable.. now that we use it twice. e.g. $hosting_feature_name
Comment #11
helmo CreditAttribution: helmo commentedpushed slightly updated as bbf9d23b0553c6847da475833ed75951b1bfdd91
Fixed? Or are there more places where we need this?