Skip to content

Use config()->delete() instead of config_clear() in .install file #21

@alanmels

Description

@alanmels

Please read backdrop/backdrop-issues#4186 (comment) to see that replacing Drupal 7's variable_del() function in .install files is not sufficient. Either config_clear() should be used in the .module file to declare variables and then the variable_del() function in .install should be dropped, or the following function:

/**
 * Implements hook_uninstall().
 */
function $mymodule_uninstall() {
  config('mymodule.settings')->delete();
}

should be used instead to get the uninstalled module's configuration file actually deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions