LEtudiant\Composer\Installer\Solver\SharedPackageInstallerSolver::update PHP Method

update() public method

public update ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $initial, Composer\Package\PackageInterface $target )
$repo Composer\Repository\InstalledRepositoryInterface
$initial Composer\Package\PackageInterface
$target Composer\Package\PackageInterface
    public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
    {
        // If both packages are not shared
        if (!$this->solver->isSharedPackage($initial) && !$this->solver->isSharedPackage($target)) {
            $this->defaultInstaller->update($repo, $initial, $target);
        } else {
            if (!$repo->hasPackage($initial)) {
                throw new \InvalidArgumentException('Package is not installed : ' . $initial->getPrettyName());
            }
            $this->symlinkInstaller->update($repo, $initial, $target);
        }
    }