Problem/Motivation

Since #2381763: Adjust the order of container yamls to override settings per environment the container_yamls setting is mandatory. However, unlike other required settings (e.g., hash_salt) the installer does not enforce it though.

Turns out that the test which should cover this does is not sufficient. Manually reproducing the issue requires the following steps:

  1. Checkout D8
  2. Create an empty settings file (echo -n > sites/default/settings.php)
  3. Click through the GUI installer
  4. Examine the updated settings file and verify that the hash_salt is there (grep hash_salt sites/default/settings.php && echo ok), then verify that container_yamls is missing (grep container_yamls sites/default/settings.php || echo oops)
  5. In the final site, trigger an action which rebuilds the container (e.g. enable a module)

This will result in the following Exception: The container_yamls setting is missing from settings.php Drupal\Core\DrupalKernel->discoverServiceProviders().

Proposed resolution

  1. Write a failing test (enable a module after installing from empty settings.php)
  2. Ensure that the installer always adds container_yamls to settings.php

Remaining tasks

User interface changes

API changes

Data model changes

Comments

znerol created an issue. See original summary.

znerol’s picture

Status: Active » Needs review
StatusFileSize
new837 bytes
znerol’s picture

StatusFileSize
new1.58 KB
new786 bytes

Status: Needs review » Needs work

The last submitted patch, 3: installer_does_not-2549591-3.patch, failed testing.

The last submitted patch, 2: TEST-ONLY-installer_does_not-2549591-2.patch, failed testing.

znerol’s picture

Status: Needs work » Needs review
StatusFileSize
new2.49 KB
new1.67 KB

Turns out that drupal_rewrite_settings() fails to parse arrays if the index is empty when reading in an existing settings.php file. Therefore it is necessary to update the default settings files.

Status: Needs review » Needs work

The last submitted patch, 6: installer_does_not-2549591-6.patch, failed testing.

znerol’s picture

StatusFileSize
new3.21 KB
new1.29 KB
znerol’s picture

Status: Needs work » Needs review
dawehner’s picture

+++ b/core/includes/install.inc
@@ -446,7 +446,9 @@ function _drupal_rewrite_settings_dump($variable, $variable_name) {
  *   into settings.php.
  */
 function _drupal_rewrite_settings_dump_one(\stdClass $variable, $prefix = '', $suffix = '') {

Should we not update the documentation of drupal_rewrite_settings() to document this new option?

berdir’s picture

Status: Needs review » Needs work

Yes, we should.

If this blocks a critical, should it be at least major too if not critical?

webchick’s picture

Priority: Normal » Major

Let's try this to start.

znerol’s picture

I guess this is resolved now that #2547447: Stop creating services.yml by default is in?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dawehner’s picture

Component: base system » install system

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

larowlan’s picture

Status: Needs work » Closed (duplicate)

On the basis of #13