Skip to content

quote generated Laravel env values#393

Merged
crazy-max merged 1 commit intoanonaddy:masterfrom
crazy-max:env-quotes
May 3, 2026
Merged

quote generated Laravel env values#393
crazy-max merged 1 commit intoanonaddy:masterfrom
crazy-max:env-quotes

Conversation

@crazy-max
Copy link
Copy Markdown
Member

fixes #358
closes #355

The current heredoc wrote values raw, which caused phpdotenv to reject unquoted values containing whitespace.

This change makes the container write generated Laravel .env values as quoted dotenv entries, so values with whitespace such as APP_NAME=Test Test no longer break startup parsing.

The init script now writes generated entries through a small dotenv_entry helper that double-quotes values and escapes backslashes, double quotes, dollar signs, and CR/LF before appending any overrides.

@crazy-max crazy-max marked this pull request as ready for review May 3, 2026 08:09
@crazy-max crazy-max merged commit 683595c into anonaddy:master May 3, 2026
5 checks passed
@crazy-max crazy-max deleted the env-quotes branch May 3, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Startup Error when Environment Configuration contains Whitespaces

1 participant