params:
- .env # load params from .env file
- env # load params from environment vars
and a value comes both from .env file and ENV variable then the .env value is always used (no matter in which order you load the params).
In the original ticket the issue was fixed in #6477 however only SymfonyDotenv section was changed, could it be that the bug is still in if using PhpDotenv?
changed the title [-].env file overiding environment variables[/-][+].env file always overiding environment variables when used in params[/+]on Jan 21, 2026
Activity
W0rma commented on Feb 17, 2026
I'm not using vlucas/phpdotenv but according to https://github.com/vlucas/phpdotenv?tab=readme-ov-file#immutability-and-repository-customization existing values are overwritten by default.
Therefore, I guess the bug still exists for PhpDotenv.
@GameBurrow Do you want submit a PR to fix the behavior?