Move hook_enable into hook_install for Drupal 9/10

Created on 16 March 2017, almost 8 years ago
Updated 20 July 2023, over 1 year ago

hook_enable() were removed in Drupal 8 this core issue and its functionality should be moved into hook_install().

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇷Brazil renatog Campinas

Live updates comments and jobs are added and updated live.
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.

  • 🇳🇴Norway gisle Norway

    Corrected title and issue summary.

  • First commit to issue fork.
  • Assigned to urvashi_vora
  • 🇮🇳India urvashi_vora Madhya Pradesh, India

    Hi @gisle,

    I have never worked on such issues before, this is first time, as per my understanding, we can definitely move the functionality of hook_enable() into hook_install().

    Additionally, to maintain modularity and keep the logic separated, we can introduce a new function implementing hook_update_data(). And we can call this new function in hook_install() to update the data during the installation process.

    I am sending a Merge request for the same.

    Please review. In case of any mistakes, please guide me.

    Thanks

  • @urvashi_vora opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India urvashi_vora Madhya Pradesh, India
Production build 0.71.5 2024