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,
rawurlencode((string) $dbPass),
(string) $dbHost,
(int) $dbPort );
$dsn =
$dsnWithoutDb . '/' .
$dbName;
$params =
['url' =>
$dsnWithoutDb, 'charset' => 'utf8mb4'
];