Updated: Comment #7

Problem/Motivation

In default.settings.php contains a reference to settings_get()

Proposed resolution

Update the $settings documentation.

Remaining tasks

t.b.d.

User interface changes

none

API changes

none

Comments

sutharsan’s picture

Status: Active » Needs review
StatusFileSize
new605 bytes
sutharsan’s picture

StatusFileSize
new779 bytes

The documentation also mentions that database information is stored in $settings, but this in not true. Description changed.

jhodgdon’s picture

Thanks for filing this!

I agree with your assessment of the bugs... I am not sure that the install profile is used at all during bootstrap though, so I don't think this is a great example for the documentation. As far as I can tell, the install profile setting is only used during installation and updates?

jhodgdon’s picture

Status: Needs review » Needs work
sutharsan’s picture

You are right, 'install_profile' is available in $settings at runtime, but is not used during installation, I did not check.

I checked the usage of some settings, and found these examples which are used during (early) bootstrap: 'drupal_classloader' and 'proxy_exceptions'. Note: proxy_server, proxy_port, etc. are listed in default.settings.php but I can't find them in core code.

Two examples of environment specific settings are: 'twig_debug' and 'file_public_path'.

We could distinguish a third type of settings for security override: 'update_free_access', 'allow_authorize_operations'. But we could see these as installation specific settings and giving too much details can harm the explanation.

jhodgdon’s picture

Agreed, we don't want too many details.

How about saying something like this:

$settings contains information that is required to start the configuration system, temporarily overrides the configuration system (for example, debug settings and security overrides), or overrides the configuration system for one site in a set of sites that shares configuration.

Is that accurate, and complete enough?

sutharsan’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.06 KB

Settings is a third system for system configuration and does not overlap (I think) with Config and Key/Value store (state). With your input, I gave the documentation another try.

Status: Needs review » Needs work

The last submitted patch, 7: default-settings-doc-2179753-7.patch, failed testing.

The last submitted patch, 7: default-settings-doc-2179753-7.patch, failed testing.

sutharsan’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

This patch loses the mention of $settings specifically. Was that intentional? I think we should still mention $settings.

Also... In Drupal 8, there is a difference between "state" and "configuration", and I think this new help text is confusing them a bit.

Also, it needs a bit of grammar and punctuation clean-up, but until the text is closer, I will wait on that part. But you might read it over and make sure it makes sense. Some of the sentences are garbled.

sutharsan’s picture

Status: Needs work » Needs review
StatusFileSize
new812 bytes

This patch removes the Configuration paragraph. The Settings text was rewritten.

jhodgdon’s picture

Status: Needs review » Needs work

OK, that's clearer, thanks!

The wording is still a bit awkward though, and there are some grammar and punctuation issues... How about:

$settings contains environment-specific configuration, such as the files directory and reverse proxy address, and temporary configuration, such as turning on Twig debugging and security overrides.

sutharsan’s picture

Status: Needs work » Needs review
StatusFileSize
new825 bytes

Agree, much better. Changed the text with your proposal. Modified the @see reference.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

I'm happy with that. If we're both happy, I think it's ready for RTBC.

jhodgdon’s picture

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.