protected function preSymlinkTask($worker, AbstractAuth $auth, $remote)
    {
        $projectRoot = $remote['rootdir'];
        $collection = $this->collectionBuilder();
        $collection->taskSsh($worker, $auth)
            ->remoteDirectory($projectRoot, true)
            ->timeout($this->getTimeoutSetting('presymlink_mirror_dir'));
        foreach ($remote['symlinks'] as $symlink) {
            list($target, $link) = explode(':', $symlink);
            if ($link === $remote['currentdir']) {
                continue;
            }
            // If the link we're going to create is an existing directory,
            // mirror that directory on the symlink target and then delete it
            // before creating the symlink
            $collection->exec('vendor/bin/robo digipolis:mirror-dir ' . $link . ' ' . $target);
            $collection->exec('rm -rf ' . $link);
        }
        return $collection;
    }
protected function preSymlinkTask($worker, AbstractAuth $auth, $remote)
    {
        $projectRoot = $remote['rootdir'];
        $collection = $this->collectionBuilder();
        $collection->taskSsh($worker, $auth)
            ->remoteDirectory($projectRoot, true)
            ->timeout($this->getTimeoutSetting('presymlink_mirror_dir'));
        foreach ($remote['symlinks'] as $symlink) {
            list($target, $link) = explode(':', $symlink);
            if ($link === $remote['currentdir']) {
                continue;
            }
            // If the link we're going to create is an existing directory,
            // mirror that directory on the symlink target and then delete it
            // before creating the symlink
            $collection->exec('vendor/bin/robo digipolis:mirror-dir ' . $link . ' ' . $target);
            $collection->exec('rm -rf ' . $link);
        }
        return $collection;
    }
protected function preSymlinkTask ( $ worker , AbstractAuth $ auth , $ remote ) { $ projectRoot = $ remote [ 'rootdir' ] ; $ collection = $ this -> collectionBuilder ( ) ; $ collection -> taskSsh ( $ worker , $ auth ) -> remoteDirectory ( $ projectRoot , true ) -> timeout ( $ this -> getTimeoutSetting ( 'presymlink_mirror_dir' ) ) ; foreach ( $ remote [ 'symlinks' ] as $ symlink ) { list ( $ target , $ link ) = explode ( ':' , $ symlink ) ; if ( $ link === $ remote [ 'currentdir' ] ) { continue ; } // If the link we're going to create is an existing directory, // mirror that directory on the symlink target and then delete it // before creating the symlink $ collection -> exec ( 'vendor/bin/robo digipolis:mirror-dir ' . $ link . ' ' . $ target ) ; $ collection -> exec ( 'rm -rf ' . $ link ) ; } return $ collection ; }
Tasks to execute before creating the symlinks.

@param string $worker
The server to install the site on.
@param \DigipolisGent\Robo\Task\Deploy\Ssh\Auth\AbstractAuth $auth
The ssh authentication to connect to the server.
@param array $remote
The remote settings for this server.

@return bool|\Robo\Contract\TaskInterface
The presymlink task, false if no pre symlink tasks need to run.
Tasks to execute before creating the symlinks .