Download the PHP package kimbee-team/dotenv-dump without Composer
On this page you can find all versions of the php package kimbee-team/dotenv-dump. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kimbee-team/dotenv-dump
More information about kimbee-team/dotenv-dump
Files in kimbee-team/dotenv-dump
Package dotenv-dump
Short Description Dumps environment variables from `.env` to `.htaccess` or plain PHP-file.
License MIT
Informations about the package dotenv-dump
DotEnvDumpBundle
The DotEnvDumpBundle
parses.env
files via DotEnv and export environment variables in .htaccess
(SetEnv directive) or .php
(return array) formats.
The main purpose of this bundle to use it as a part of a deploy process for a shared hosting where you can't edit environment variables.
During development, you'll use the .env
file to configure your environment variables. On your production server, it is recommended to configure these at the web server level.
So if you're using Apache, you can pass these variables via SetEnv directive in .htaccess
file.
Or you can just cache them into .env.php
file and replace in your front controller (index.php):
with something like
Usage
Invoked with no parameters will export to .htaccess
in the %kernel.project_dir%
.
It's a safe to invoke command few times in a row.
Example
bin/console dotenv:dump --htaccess .htaccess
will prepend (or replace if already exists) in the .htaccess
following content:
bin/console dotenv:dump --php .env.php
will rewrite .env.php
file with the following content:
Installation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
License
This bundle is released under the MIT license
All versions of dotenv-dump with dependencies
symfony/framework-bundle Version ~3.4|~4.0
symfony/dotenv Version ~3.4|~4.0