public function setupDrupalSettings()
    {
        $this->_copy(
            "{$this->sitesPath}/default/default.settings.php",
            $this->settingFile
        );
        $install_root = dirname($this->getQualifiedInstallRoot());

        if ($this->getProjectVersion() >= 8) {
            $this->taskWriteToFile("{$install_root}/salt.txt")
                ->line(Utility::randomHash())
                ->run();

            $this->taskFilesystemStack()
                ->mkdir("{$install_root}/config", 0775)
                ->chmod("{$install_root}/salt.txt", 0775)
                ->run();

            $this->taskWriteToFile($this->settingFile)
                ->append()
                ->regexReplace(
                    '/\#\sif.+\/settings\.local\.php.+\n#.+\n\#\s}/',
                    $this->drupalSettingsLocalInclude()
                )
                ->replace(
                    '$config_directories = array();',
                    '$config_directories[CONFIG_SYNC_DIRECTORY] = dirname(DRUPAL_ROOT) . \'/config\';'
                )
                ->replace(
                    '$settings[\'hash_salt\'] = \'\';',
                    '$settings[\'hash_salt\'] = file_get_contents(dirname(DRUPAL_ROOT) . \'/salt.txt\');'
                )
                ->run();
        }

        return $this;
    }