Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Phase 1 fits in the more general plan to make this module's drush aspect run on several versions at once.
This is happening on the 6--2 branch. This should eventually, when run under drush, generate module code for an installation of Drupal 5, 6, or 7.
Phase 2 will be the D7 UI, and a proper 7--2 branch of the module to run as a regular D7 module.
How to get hook information from the new D7 api files.
Initially these seem great -- no more hook data to download, hurrah!
But they hold no information about where their hooks are to go.
Eg, system.api.php lists both hook_boot and hook_install, which go in the module file and the install file respectively, but gives no indication of this. (#633332: hook API documentation files have no information about where hooks are to go)
When executing "drush mbdl" on a current 6.x-2.x-dev, the following error is emitted a few hundred times
WD php: Warning: preg_match(): Delimiter must not be alphanumeric or backslash in file_scan_directory() (line 1656 of [warning] /Applications/MAMP/htdocs/drupal-7.0-alpha3/includes/file.inc).
This is caused by a change in the meaning of $mask parameter to drupal_system_listing():
Comments
Comment #1
joachim commentedMy plan for D7 is in two phases.
Phase 1 fits in the more general plan to make this module's drush aspect run on several versions at once.
This is happening on the 6--2 branch. This should eventually, when run under drush, generate module code for an installation of Drupal 5, 6, or 7.
Phase 2 will be the D7 UI, and a proper 7--2 branch of the module to run as a regular D7 module.
Comment #2
joachim commentedMain problem to solve in phase 1:
How to get hook information from the new D7 api files.
Initially these seem great -- no more hook data to download, hurrah!
But they hold no information about where their hooks are to go.
Eg, system.api.php lists both hook_boot and hook_install, which go in the module file and the install file respectively, but gives no indication of this. (#633332: hook API documentation files have no information about where hooks are to go)
Comment #3
joachim commentedPhase 1 is pretty much complete; though the hook templates you get in your functions will not always be up to date for D7!
Comment #4
rfayThis is an excellent initiative. I haven't been able to figure out how to use it (getting hook definitions) but look forward to this in the future.
Comment #5
lyricnz commentedWhen executing "drush mbdl" on a current 6.x-2.x-dev, the following error is emitted a few hundred times
WD php: Warning: preg_match(): Delimiter must not be alphanumeric or backslash in file_scan_directory() (line 1656 of [warning] /Applications/MAMP/htdocs/drupal-7.0-alpha3/includes/file.inc).This is caused by a change in the meaning of $mask parameter to drupal_system_listing():
Comment #7
rfayPlease add to the howto/front page that you have to do a
to download the hooks. I didn't see this mentioned, and it took me some time to figure it out.
Comment #8
joachim commentedFiled these as separate issues:
- #6: #781268: This is caused by a change in the meaning of $mask parameter to drupal_system_listing()
- #7: #781258: clearer message about needing to download hook data
Comment #9
joachim commentedThe UI from version 6 has now been ported to Drupal 7, and a dev release is now available.
Please report any problems you find. For improvements, see #1015482: puts hooks in vertical tabs :)
Comment #10
joachim commentedOh I forgot:
Phase 3: update the hook body templates.
For that I need to change that whole system so several versions of templates can co-exist.
Comment #11
joachim commentedTemplate versioning is now done, so closing.