Avoid absolute paths in settings.php

Created on 19 April 2025, 6 days ago

Problem/Motivation

Drupal Flake adds a stanza to the settings.php file to include its database settings. This include uses the hardcoded current path on the system -- which makes it not portable.

It does rewrite this at startup, but if you have multiple developers that keep their local copies in different paths, you end up with changes to the settings file -- if this is tracked in git (which I recommend) then this is not ideal.

Steps to reproduce

Set up a site with Drupal Flake, start the services, and commit the settings file.

Move to a different machine or different directory, and start the services again. You now have an override on the settings.php file which you have to deal with -- ignore, commit, etc. If you commit and push, you could cause merge conflicts for other developers.

Proposed resolution

Make sure the paths in the Nix Settings block are all relative to the $app_root.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024