private readonly string
$projectDir,
private readonly UniqueIdGenerator
$idGenerator ) { } /**
* @param Shop $shop
*/
public function writeConfig(DatabaseConnectionInformation
$info, array
$shop): void
{ $uniqueId =
$this->idGenerator->
getUniqueId();
$secret = Key::
createNewRandomKey()->
saveToAsciiSafeString();
// Copy flex default .env if missing
if (!
file_exists($this->projectDir . '/.env'
)) { $template =
str_replace( [ 'SECRET_PLACEHOLDER',
'INSTANCEID_PLACEHOLDER',
],
[ $secret,
$uniqueId,
],