Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Exception when parsing .env with comments #395

Merged
merged 1 commit into from
May 19, 2023

Conversation

evansims
Copy link
Member

Changes

This resolves an issue with parsing .env files that contain lines without standard key-value strings, such as # Comments.

References

Resolves #394

Contributor Checklist

@evansims evansims requested a review from a team as a code owner May 19, 2023 05:13
@evansims evansims assigned evansims and unassigned evansims May 19, 2023
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (507f5a7) 100.00% compared to head (60e6cc0) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #395   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       496       496           
===========================================
  Files             31        31           
  Lines           1271      1271           
===========================================
  Hits            1271      1271           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Configuration.php 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@evansims evansims added the Scope: Bug Confirmed report of unexpected problems or unintended behavior. label May 19, 2023
@cwp-sheal
Copy link

Could I ask why there is manual processing of .env files?

Doing this causes problems where:

  1. I use comments in an env file
  2. If I don't put them in the .env and instead us OS level environment variables (docker)

@evansims evansims merged commit 1af131f into main May 19, 2023
@evansims evansims deleted the fix/dotenv-parsing-exception branch May 19, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Bug Confirmed report of unexpected problems or unintended behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current version (7.8) fails to parse .env comments
2 participants