protected function processSettingsPhp()
    {
        if ($this->copy) {
            // This behaviour only relates to symlinking.
            return;
        }
        $settingsPhpFile = $this->appRoot . '/settings.php';
        if (file_exists($settingsPhpFile)) {
            $this->stdErr->writeln("Found a custom settings.php file: $settingsPhpFile");
            $this->fsHelper->copy($settingsPhpFile, $this->getWebRoot() . '/sites/default/settings.php');
            $this->stdErr->writeln(
                "  <comment>Your settings.php file has been copied (not symlinked) into the build directory."
                . "\n  You will need to rebuild if you edit this file.</comment>"
            );
            $this->ignoredFiles[] = 'settings.php';
        }
    }
protected function processSettingsPhp()
    {
        if ($this->copy) {
            // This behaviour only relates to symlinking.
            return;
        }
        $settingsPhpFile = $this->appRoot . '/settings.php';
        if (file_exists($settingsPhpFile)) {
            $this->stdErr->writeln("Found a custom settings.php file: $settingsPhpFile");
            $this->fsHelper->copy($settingsPhpFile, $this->getWebRoot() . '/sites/default/settings.php');
            $this->stdErr->writeln(
                "  <comment>Your settings.php file has been copied (not symlinked) into the build directory."
                . "\n  You will need to rebuild if you edit this file.</comment>"
            );
            $this->ignoredFiles[] = 'settings.php';
        }
    }
protected function processSettingsPhp ( ) { if ( $ this -> copy ) { // This behaviour only relates to symlinking. return ; } $ settingsPhpFile = $ this -> appRoot . '/settings.php' ; if ( file_exists ( $ settingsPhpFile ) ) { $ this -> stdErr -> writeln ( "Found a custom settings.php file: $settingsPhpFile" ) ; $ this -> fsHelper -> copy ( $ settingsPhpFile , $ this -> getWebRoot ( ) . '/sites/default/settings.php' ) ; $ this -> stdErr -> writeln ( "  <comment>Your settings.php file has been copied (not symlinked) into the build directory." . "\n  You will need to rebuild if you edit this file.</comment>" ) ; $ this -> ignoredFiles [ ] = 'settings.php' ; } }
Handle a custom settings.php file for project and profile mode.

If the user has a custom settings.php file, and we symlink it into
sites/default, then it will probably fail to pick up
settings.local.php from the right place. So we need to copy the
settings.php instead of symlinking it.

See https://github.com/platformsh/platformsh-cli/issues/175
Handle a custom settings . php file for project and profile mode .