Remove restriction forcing hook_install_tasks_alter() implementations to be placed in optional .profile file

Created on 3 March 2022, over 2 years ago
Updated 9 February 2023, over 1 year ago

Problem/Motivation

#340723: Make modules and installation profiles only require .info.yml files β†’ made .module/.profile files optional, but introduced requirement for .profile files to be present to run hook_install_tasks_alter() implementations. According to #655190: Allow hook_install_tasks() to be called from a profile's .install file (or document that it can't be) β†’ hook_install_tasks() are expected to be located in the .profile file and so are hook_install_tasks_alter().

Steps to reproduce

  1. create minimal.install file inside core/profiles/minimal/
  2. place the following code in the minimal.install file to skip the "Configure site" step
    function minimal_install_tasks_alter(&$tasks) {
      unset($tasks['install_configure_form']);
    }
    
  3. try to install Minimal profile from the browser

Expected result

No "Configure site" step.

Actual result

"Configure site" step present.

Proposed resolution

Remove the check for the .profile file presence before checking if profile implements hook_install_tasks_alter() from install_tasks() as .install file is already loaded by that time to check for hook_install_tasks() implementation.

Remaining tasks

  1. Patch
  2. Review
  3. Commit

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
InstallΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡³πŸ‡ΏNew Zealand RoSk0 Wellington

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.71.5 2024