atournayre / dotenv-updater-bundle
.env updater bundle for Symfony 4
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.1.3
- atournayre/dotenv-editor: v1.2.*
- symfony/config: 4.4.*
- symfony/console: 4.4.*
- symfony/dependency-injection: 4.4.*
- symfony/dotenv: 4.4.*
- symfony/http-kernel: 4.4.*
Conflicts
README
The .env updater bundle helps managing .env.*.php files.
Getting Started
$ composer require atournayre/dotenv-updater-bundle
Configuring
Enable the bundle
# config/bundles.php return [ // ... Atournayre\DotEnvUpdaterBundle\AtournayreDotEnvUpdaterBundle::class => ['all' => true], // ... ];
Usage
Files .env.*.php are only updated, not created.
Update .env.local.php from .env
$ php bin/console dotenv:update
Example : update .env.prod.php from .env
$ php bin/console dotenv:update .env.prod.php
Debug
Get list of variables and values defined in the .env.*.php file.
$ php bin/console dotenv:update --debug
Update specific variable in .env.local.php
$ php bin/console dotenv:update:element
Update specific variable in .env.*.php
$ php bin/console dotenv:update:element <.env.*.php>