The documentation for drupal_parse_info_file tells developers to use variable_set and variable_get to create module settings.

Info files are NOT for placing arbitrary theme and module-specific settings. Use variable_get() and variable_set() for that. Info files are formatted as YAML. If the 'version' key is set to 'VERSION' in any info file, then the value will be substituted with the current version of Drupal core.

It should instead refer them to the Config class methods.

Info files are NOT for placing arbitrary theme and module-specific settings.
Use the Config::get() and Config::set()->save() for that. Info files are
formatted as YAML. If the 'version' key is set to 'VERSION' in any info file,
then the value will be substituted with the current version of Drupal core.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frob’s picture

Assigned: frob » Unassigned
Status: Active » Needs review
FileSize
964 bytes

here is a patch

jhodgdon’s picture

Status: Needs review » Needs work

Let's take "the" out of "Use the Config::get() and Config::set()->save() for that.". Thanks!

frob’s picture

jhodgdon’s picture

Assigned: Unassigned » jhodgdon
Status: Needs work » Reviewed & tested by the community

Looks good! Assuming the test bot agrees (you needed to set the issue status to "needs review" when you submitted the new patch), I'll get this committed shortly. Thanks!

frob’s picture

Status: Reviewed & tested by the community » Needs review

oops, sorry

frob’s picture

Status: Needs review » Reviewed & tested by the community

it passed

jhodgdon’s picture

Assigned: jhodgdon » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.