justbetter/dotenv
最新稳定版本:1.2.0
Composer 安装命令:
composer require justbetter/dotenv
包简介
Module to overwrite and set environment variables
README 文档
README
Adds support for .env configuration files to Magento 2. Variables in the .env file are used to fill in app/etc/env.php variables. This file can be added to source control when using this package. I think having more than one environment file is weird.
Credits
Credits to this package which inspired me to make this package.
Installation
composer require justbetter/dotenv- Copy the
.env.exampleexample file toapp/etc/.env, or..envand fill in your environment variables. - Replace the
env.phpwith this one and commit it to source control. bin/magento setup:upgrade
Extending the environments
You can override specific environments with the APP_ENV variable in the dot env filename. example. Copy the file to app/etc/ and modify for any specified environment.
You can also load additional .env files by defining them in LOAD_BEFORE (allowing the values in these files to be overridden) or LOAD_AFTER (allowing the values in these files to override all others) with your extra .env files you would like to load.
Disabled the writer to env.php
Because of the Writer class of magento 2 the env.php get rewrited every time. I disabled this functionality because the env.php file is not static. The cache types are not reset every time when you run bin/magento setup:upgrade.
Compatibility
The module is tested on Magento version 2.4.x
Ideas, bugs or suggestions?
Please create a issue or a pull request.
About us
We’re a innovative development agency from The Netherlands building awesome websites, webshops and web applications with Laravel and Magento. Check out our website justbetter.nl and our open source projects.
License
统计信息
- 总下载量: 12.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2020-09-04
