Make .install file layouts consistent

Created on 9 October 2007, almost 18 years ago
Updated 4 August 2025, 2 days ago

As pointed out in the development list, all install files should have a consistent layout. yched β†’ proposed

1. hook_schema()
2. hook_install()
3. hook_uninstall()
4. hook_update_N()

This order looks reasonable. However, I've also seen hook_enable() and hook_disable() in some install files. Enhancing the above list with them:

1. hook_schema()
2. hook_install()
3. hook_enable()
4. hook_disable()
5. hook_uninstall()
6. hook_update_N()

Changing existent install files will most likely break many PNR patches in the current queue. Thus, delaying this commit might be considerable. On the other hand, contrib module developers might already start to port their modules to 6.x using the current (partially wrong) layout. Furthermore, the (preferred) layout should be documented somewhere, however, I've no idea where. I'm open to create a patch to update existing install files.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

other

Created by

πŸ‡©πŸ‡ͺGermany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024