atournayre/dotenv-updater-bundle

.env updater bundle for Symfony 4

0.0.0 2021-04-04 16:12 UTC

This package is auto-updated.

Last update: 2024-03-28 23:02:26 UTC


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>