fix(service): preserve explicit env_file and stop implicit .env injection#8494
Closed
1312e wants to merge 6 commits intocoollabsio:nextfrom
Closed
fix(service): preserve explicit env_file and stop implicit .env injection#84941312e wants to merge 6 commits intocoollabsio:nextfrom
1312e wants to merge 6 commits intocoollabsio:nextfrom
Conversation
Author
|
Validation run (local): php -l bootstrap/helpers/parsers.php
# No syntax errors detected in bootstrap/helpers/parsers.php
php -l tests/Unit/ComposeEnvFileSemanticsTest.php
# No syntax errors detected in tests/Unit/ComposeEnvFileSemanticsTest.phpRegression guard added in |
Author
|
@ShadowArcanist could you please take a look when you have time? This PR is scoped only to remove implicit |
added 3 commits
February 20, 2026 23:56
Member
|
@1312e bountys require a video demo, please provide. Also you aren't following our Contribution Guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.envintoenv_filefor parsed compose services/applicationsenv_fileentries from user composeWhy
Docker Compose semantics treat
.envas interpolation input, not implicit runtime env injection for every service. Auto-injecting.envcan leak variables into containers that never opted in.Scope
This PR is intentionally minimal and only contains #7655-related parser/test changes.
Tests
php -l bootstrap/helpers/parsers.phpphp -l tests/Unit/ComposeEnvFileSemanticsTest.phptests/Unit/ComposeEnvFileSemanticsTest.phpcovers:env_filebehavior->push('.env')Docs
N/A - internal parser behavior change; no user-facing service template/docs page changes.
Bounty
/claim #7655