Closed (won't fix)
Project:
Drupal core
Version:
10.0.x-dev
Component:
base system
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2015 at 12:54 UTC
Updated:
3 Jul 2021 at 09:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikeker commentedComment #2
mikeker commentedAlso renaming the example file.
Comment #3
mikeker commentedFYI: There was a brief discussion of this at the beginning of #1118520: Add inclusion of a settings.local.php file in settings.php.
Comment #4
lucastockmann commentedYou missed out some "settings.local.php" strings in the comments, I fixed this.
Here is my patch.
But your code changes and renaming worked fine.
Comment #5
mikeker commentedAdded related issue #2315613: Add a development.services.yml for development, which starts out as services.local and then sees the light... :)
Comment #6
nicoleheard commentedRe-rolled the patch to apply cleanly to commit db60a8c
Comment #7
mikeker commentedThe example.local.settings.php file is missing from the latest patch... I'm not sure where it happened, but the renaming of the example file seems to have turned into an add/remove instead.
Comment #8
mikeker commentedFound another reference that I missed. Grrr... OK, I've grep'ed and searched by install and there are no more references to
settings.local.php. Really! Promise! :)I've included a small pile of interdiffs because the rename of example.settings.local.php went from a two-line "rename from x to y" to a 100 lines of +/- which hides the latest change since it was in that file. Hopefully this makes things clearer.
Comment #9
mikeker commentedAlso note that you'll want #2381091: Improve example.gitignore to update your .gitignore file to the new naming scheme.
Comment #10
mikeker commentedComment #11
mikeker commentedJust noticed that Git "helpfully" found a similar file (
sites/default/local.settings.php) tosites/example.settings.local.phpwhen diff'ing for the patch in #8. So the example file got renamed AND copied. Thanks, Git! :)This patch does a clean rename from
sites/example.settings.local.phptosites/example.local.settings.php. Since I can't really include a proper interdiff with this change, here's a diff of the two patches:Comment #12
Shivam Agarwal commentedPatch doesn't seems to work. It throws following error when I tried to apply :
<
Comment #13
mikeker commented@Shivam Agarwal: I just applied the patch to the latest pull of 8.0.x without errors. Can you try it against the latest HEAD?
Please include the errors from git apply and set the issue to Needs work if you still have problems.
Comment #14
Shivam Agarwal commented@mikekr, sorry my fault. It cleanly applied to latest head. It looks good. :) Thanks
Comment #15
xjmThanks @Shivam Agarwal and @mikeker for your work here! And thank you for adding the beta evaluation.
Unfortunately, this is not only a documentation change. While it is indeed commented out by default, it still makes a change to
system_requirements()and to a recommendation or expectation for a functional code path. The "unfrozen" category for documentation is intended to encourage people to improve actual documentation that explains how Drupal works.@alexpott and I discussed the disruption (or not) of this patch for awhile this morning. At first glance I thought this change would break existing sites using
settings.local.phponce the section in the mainsettings.phpwas changed. But that is not actually the case -- since we do not update existing sites'settings.php(and shouldn't), those sites would continue to use the previous code checking for the other name pattern.Still, we are at a minimum changing a site builder expectation (and a bit of runtime code), so I think it's better to postpone this to 9.x. If you disagree, move it back and we can discuss it more.
Comment #16
xjmComment #17
mikeker commented@xjm: Understood re: doc changes. I think I added that part of the beta eval before I added the
system_requirementschange. Sorry, I should have updated the beta eval when that change went into the patch.I'm fine with postponing. I'll keep my OCD in check when adding my dev settings file for the next few years... :) Thank you for giving this issue such thorough consideration!
Somewhat tangentially related issue, while we're on the subject of settings files: #2381091: Improve example.gitignore
Comment #18
catchI think we could look at this for a minor release - it'd only be documentation + string changes.
Comment #19
star-szrJust made this somewhat related issue: #2618158: The location of example.settings.local.php is confusing
Comment #21
heddnFrom a file system sort ordering thing, I prefer all my "settings" files to be together. ex. settings.local.php, settings.dev.php, settings.stage.php, settings.php, etc. If they are scattered around with various names, then I find it is harder to locate them and I miss seeing them in a visual inspection.
Comment #22
corbacho commentedGood idea.
I spotted a possible issue with gitignore, but I opened it in a new issue, in case the scope of this one gets bigger:
#2723261: Ignore local development files in example.gitignore
Comment #27
chipway commentedI agree with @heddn, for the naming parts order to find related files together.
Comment #34
jcnventuraIf this were to happen, it should not be before 10.0, since Drupal 9 is already been released and this should not be the kind of change done in minor versions.
That being said, I agree with @heddn. settings.local.php makes a LOT more sense than local.settings.php. I vote to simply close this issue as a "won't fix".
Comment #35
berdirThere has been no attempt at moving this forward in many years, agree to have the settings files together is useful. Yes, default.settings.php is different, but that is actually also something very different and is not used at runtime, so makes kind of sense to have it separate.
Agreed with won't fix. If someone feels strongly we could reopen but apparently nobody did in 6 years now or so :)