protected function storeConfiguration()
{
$dbConfig = $this->dbConfig;
$config = ['debug' => false, 'database' => ['driver' => $dbConfig['driver'], 'host' => $dbConfig['host'], 'database' => $dbConfig['database'], 'username' => $dbConfig['username'], 'password' => $dbConfig['password'], 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => $dbConfig['prefix'], 'strict' => false], 'url' => $this->baseUrl, 'paths' => ['api' => 'api', 'admin' => 'admin']];
$this->info('Testing config');
$this->application->instance('flarum.config', $config);
/* @var $db \Illuminate\Database\ConnectionInterface */
$db = $this->application->make('flarum.db');
$version = $db->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
if (version_compare($version, '5.5.0', '<')) {
throw new Exception('MySQL version too low. You need at least MySQL 5.5.');
}
$this->info('Writing config');
file_put_contents($this->getConfigFile(), '<?php return ' . var_export($config, true) . ';');
}