Skip to content

In the local development environment, incorrect settings are being applied.

We've been noticing this issue for quite some time, but on one specific project, due to its particular configuration, many developers are now experiencing it more frequently.

Here's the relevant .lakedrops.yml configuration:

dorgflow: {  }
ahoy: {  }
docker4drupal:
...
  settings.docker.php: "$config['my_module']['env'] = 'dev';"
...
lakedrops-dev: {  }
lakedrops: {  }
stage_overwrites:
  develop:
    docker4drupal:
...
      settings.docker.php: "$config['my_module']['env'] = 'stage';"
...
  main:
    docker4drupal:
...
      settings.docker.php: "$config['my_module']['env'] = 'prod';"
...

We would expect that $config['my_module']['env'] = 'dev'; is always added to settings.docker.php when running locally, but that’s not always the case. In some situations, the stage value gets added instead.

After some testing, I noticed a pattern:

  • When I run a d4d stop (or simply turn off the PC), then start the project again with l3d and run composer install, the wrong value (stage) gets written to settings.docker.php.

  • To fix it, we usually:

  1. Delete the .env file
  2. Exit from the l3d container
  3. Run l3d and composer install` again -> At that point, the standard questionnaire appears and the correct value (dev) is added.

However, if I repeat the cycle - a d4d stop, exit, l3d, then composer install - the issue reappears.

I’ve compared the .env files before and after deletion - they are identical. The branch remains develop throughout; there’s no switching involved.

I'll continue investigating and try to debug this further.