Closed (works as designed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Nov 2010 at 00:19 UTC
Updated:
11 Feb 2024 at 05:30 UTC
Jump to comment: Most recent
Comments
Comment #1
mlncn commented+1
Comment #2
grendzy commented+1 for common.settings.php. I would also like a default/local_settings.php, which would be local overrides used for configuration that differs between servers (for example reverse_proxy might be TRUE on production but FALSE on a development box).
Regarding default.settings.php, I can see a couple of concerns. 1), the name "default" might cause users to confuse it with the "default" site, when in fact it would apply to all sites. How about core.settings.php? 2) If this is a file packaged with core, are users allowed to "hack" it? If yes, that brings us back to the pain of D5 where every point release update overwrote our settings file. If no, then why put it here at all? Why not set essential defaults in bootstrap.inc?
For new features / bug fixes incorporated into default.settings.php, it would help if you can provide some historical examples. How often has this happened in our project's history?
Comment #3
traviscarden commentedHowever it's accomplished, I would love to see, if you will, an object-oriented approach to settings such that you have a main site configuration and modify in variants only the things that are different. I have a site with over five different environments for development, testing, and staging, and all of them have a few things in common (like variable overrides, cache includes, etc.) but each one connects to a different database. Nevertheless, I have to re-specify all the common elements in every settings.php, which violates the DRY principle and causes all the usual problems.
Comment #4
deviantintegral commentedFor now, use an include file for settings common across multiple sites. Works very well for settings like string overrides that nearly always should be shared.
Comment #5
traviscarden commentedThank you, @deviantintegral, that's a good workaround. (Why didn't I think of it?)
Comment #6
hackwater commentedWe like to include the settings file in all our settings.php files (we run multi-site), keeping the actual settings.php file pretty bare-bones and site-specific. If default.settings.php should change, those changes are automatically incorporated unless we've overridden them in the specific site.
We also include common settings (we store those in sites/) for things like external DBs (so a Drupal-style $database array entry for a DB all sites should be able to switch to and read from).
Comment #19
quietone commented@deviantintegral, thanks for the suggestion!
The proposal doesn't met the Criteria for evaluating proposed changes. In this case, there is not demonstrated demand and support for the change.
Cheers