You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the situation that I relocated the env files lookup from root to root/my-custom-folder. It works just fine with configuring runtime variables (dotenv_path) in the composer.json.
"runtime": {
"dotenv_path": "env/.env",
}
However when I want to dump-env the variables into a php file I run into the problem that the symfony:dump-env command always looks for the project root instead of using the newly configured env folder.
In the DumpEnvCommand class the path is hardcoded.
class Symfony\Flex\Command\DumpEnvCommand
protectedfunction execute(InputInterface$input, OutputInterface$output): int
{
if ($env = $input->getArgument('env')) {
$_SERVER['APP_ENV'] = $env;
}
$path = $this->options->get('root-dir').'/.env';
Proposed solutions:
Either add an optional argument to the command (path) where the lookup path for .env could be overridden (this seems to be the easiest solution)
Get the location of the env files from runtime somehow? (haven't done any proof of concept about this yet)
Symfony version: v.6.0.0
Flex version: v1.18.1
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Problem
Given the situation that I relocated the env files lookup from root to root/my-custom-folder. It works just fine with configuring runtime variables (dotenv_path) in the composer.json.
However when I want to dump-env the variables into a php file I run into the problem that the symfony:dump-env command always looks for the project root instead of using the newly configured env folder.
In the DumpEnvCommand class the path is hardcoded.
class Symfony\Flex\Command\DumpEnvCommand
Proposed solutions:
Either add an optional argument to the command (path) where the lookup path for .env could be overridden (this seems to be the easiest solution)
Get the location of the env files from runtime somehow? (haven't done any proof of concept about this yet)
Symfony version: v.6.0.0
Flex version: v1.18.1
The text was updated successfully, but these errors were encountered: