option('source'); $targetFile = $this->option('target'); $template = require $sourceFile; $target = file_exists($targetFile) ? (require $targetFile) : []; $this->info("Configure the new environment variable values. Current values are shown in square brackets. Just press ENTER to leave the default. This will overwrite {$targetFile}"); foreach ($template as $key => $value) { $current = isset($target[$key]) ? $target[$key] : $value; $target[$key] = $this->ask("{$key} [{$current}]:", $current); } file_put_contents($targetFile, $this->compileFile($target)); return 0; } /** * Compiles the configuration array into a file that can later be required * within PHP. * * @param array $configuration * @return string */ public function compileFile(array $configuration) { $values = var_export($configuration, true); return "