private function finalStep() { $model = new FinalStep(); Yii::setAlias('@webroot', Yii::getAlias('@app/web/')); foreach ($model->attributes() as $attribute) { if ($attribute !== 'useMemcached') { $model->setAttributes([$attribute => $this->prompt("-> {$attribute}", ['required' => true, 'default' => $model->{$attribute}])]); } else { $model->useMemcached = $this->confirm("Use memcached extension?", false); } } if (getenv('DP2_SERVER_NAME')) { $model->serverName = getenv('DP2_SERVER_NAME'); } if (InstallerHelper::writeCommonConfig($model) && InstallerHelper::updateConfigurables()) { file_put_contents(Yii::getAlias('@app/installed.mark'), '1'); $this->stdout("Installation complete!\n", Console::FG_GREEN); } else { $this->stderr("Unable to write configs!\n", Console::FG_RED); } return 0; }