Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.3 |
As reported by @tiger-seo in #23799:
-
i am grateful for all your hard work, but this change is a breaking change and it is not mentioned :(
-
to give you more info why it is a BC, please see our
env_autoload.php
, which is used instead ofautoload.php
:
<?php
/** @var \Composer\Autoload\ClassLoader $loader */
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\Dotenv\Exception\PathException;
$loader = require __DIR__ . '/autoload.php';
$dotenv = new Dotenv;
try {
// existing environment variables are never overridden
$dotenv->load(__DIR__ . '/config/.env');
} catch (PathException $e) {
}
// existing environment variables are never overridden
$dotenv->load(__DIR__ . '/config/.env.dist');
return $loader;
- @tiger-seo, I think you could try to load the
.env.dist
earlier than the.env
:
// existing environment variables are never overridden
$dotenv->load(__DIR__ . '/config/.env.dist');
try {
// existing environment variables are never overridden
$dotenv->load(__DIR__ . '/config/.env');
} catch (PathException $e) {
}
return $loader;
- yes, this is exactly how we've fixed it