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;
    }