$env =
[];
$emptyValidation =
static function Dstring
$value): string
{ if (trim($value) === ''
) { throw new \
RuntimeException('This value is required.'
);
} return $value;
};
$dbUser =
$io->
ask('Database user', 'app',
$emptyValidation);
$dbPass =
$io->
askHidden('Database password'
) ?: '';
$dbHost =
$io->
ask('Database host', 'localhost',
$emptyValidation);
$dbPort =
$io->
ask('Database port', '3306',
$emptyValidation);
$dbName =
$io->
ask('Database name', 'shopware',
$emptyValidation);
$dbSslCa =
$io->
ask('Database SSL CA Path', ''
);
$dbSslCert =
$io->
ask('Database SSL Cert Path', ''
);
$dbSslKey =
$io->
ask('Database SSL Key Path', ''
);
$dbSslDontVerify =
$io->
askQuestion(new ConfirmationQuestion('Skip verification of the database server\'s SSL certificate?', false
));
$dsnWithoutDb =
sprintf( 'mysql://%s:%s@%s:%d',
(string) $dbUser,