-
-
Save mkurzeja/078ec50f315e3bd36be9f1a82a5c3123 to your computer and use it in GitHub Desktop.
Better Env handling in Symfony 3.2 and 3.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add this | |
(new \Symfony\Component\Dotenv\Dotenv())->load(__DIR__.'/../.env'); | |
// before this line | |
$kernel = new AppKernel('dev', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
database_host: '%env(DB_HOST)%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment