Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292987

Clean up hook_install() in Standard Install Profile

$
0
0

Problem/Motivation

The standard_install() function from the Standard instlal profile is quite messy. It's difficult to maintain, and difficult to build upon. When people make a new install profile, they use that as a template, and it results in many poorly documented install profiles in the contrib world.

Proposed resolution

Switch over to two different patterns rather than having one big standard_install function:

  1. Configuration management through .yml files for configuration
  2. Introduce the use of hook_install_tasks() for non-configuration things to allow splitting the standard_install into grouped functionality

Remaining tasks

  • Review
  • RTBC

User interface changes

No user interface changes here.

API changes

standard_install() is deprecated in place of standard_install_tasks().

Original report by Rob Loach

Splitting standard_install into a number of hook_install_tasks() will clean up the function, and introduce some sanity in the install process.


Viewing all articles
Browse latest Browse all 292987

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>