Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #21 Added custom dotenv variable value formatter (Marius Sprunskas)
This PR was merged into the master branch. Discussion ---------- Added custom dotenv variable value formatter Jackiedo\DotenvEditor\DotenvFormatter::formatValue method makes assumption, that value must be escaped if slashes are present. It does not work properly, when type of env variable is JSON (https://symfony.com/blog/new-in-symfony-3-4-advanced-environment-variables), example: ``` #.env.dist SPECIAL_IPS="[\"127.0.0.1/8\", \"172.17.0.1/16\"]" ``` we get ``` #.env SPECIAL_IPS="\"[\\\"127.0.0.1/8\\\", \\\"172.17.0.1/16\\\"]\"" ``` Ideallly, helper generated .env file shoud be identical file to dist file, but without comments. Commits ------- d182b15 Added custom dotenv variable value formatter
- Loading branch information