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

Breadcrumb

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

function MetapackageInstaller::update

@inheritDoc

Overrides InstallerInterface::update

File

vendor/composer/composer/src/Composer/Installer/MetapackageInstaller.php, line 95

Class

MetapackageInstaller
Metapackage installation manager.

Namespace

Composer\Installer

Code

public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {
    if (!$repo->hasPackage($initial)) {
        throw new \InvalidArgumentException('Package is not installed: ' . $initial);
    }
    $this->io
        ->writeError("  - " . UpdateOperation::format($initial, $target));
    $repo->removePackage($initial);
    $repo->addPackage(clone $target);
    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