Skip to content

Instantly share code, notes, and snippets.

@mkurzeja

mkurzeja/app.php Secret

Created Feb 2, 2017
Embed
What would you like to do?
Better Env handling in Symfony 3.2 and 3.3
<?php
// add this
(new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__.'/../.env');
// before this line
$kernel = new AppKernel('dev', true);
parameters:
database_host: '%env(DB_HOST)%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment