Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SvnDownloader.php

function SvnDownloader::doUpdate

@inheritDoc

Overrides VcsDownloader::doUpdate

File

vendor/composer/composer/src/Composer/Downloader/SvnDownloader.php, line 70

Class

SvnDownloader
@author Ben Bieker <mail@ben-bieker.de> @author Till Klampaeckel <till@php.net>

Namespace

Composer\Downloader

Code

protected function doUpdate(PackageInterface $initial, PackageInterface $target, string $path, string $url) : PromiseInterface {
    SvnUtil::cleanEnv();
    $ref = $target->getSourceReference();
    if (!$this->hasMetadataRepository($path)) {
        throw new \RuntimeException('The .svn directory is missing from ' . $path . ', see https://getcomposer.org/commit-deps for more information');
    }
    $util = new SvnUtil($url, $this->io, $this->config, $this->process);
    $flags = [];
    if (version_compare($util->binaryVersion(), '1.7.0', '>=')) {
        $flags[] = '--ignore-ancestry';
    }
    $this->io
        ->writeError(" Checking out " . $ref);
    $this->execute($target, $url, array_merge([
        'svn',
        'switch',
    ], $flags), sprintf("%s/%s", $url, $ref), $path);
    return \React\Promise\resolve(null);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal