public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
    {
        if (!$repo->hasPackage($initial)) {
            throw new \InvalidArgumentException('Package is not installed: '.$initial);
        }

        $this->logVerbose(sprintf('Updating Contao sources for %s', $initial->getName()));

        $contaoRoot = $this->getContaoRoot();

        $this->removeSymlinks($initial, $contaoRoot, $this->getSources($initial));

        parent::update($repo, $initial, $target);

        $this->addSymlinks($target, $contaoRoot, $this->getSources($target));
        $this->addCopies($target, $this->getFilesRoot(), $this->getUserFiles($target), self::DUPLICATE_IGNORE);
        $this->addRunonces($target, $this->getRunonces($target));

        $this->logVerbose('');
    }
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
    {
        if (!$repo->hasPackage($initial)) {
            throw new \InvalidArgumentException('Package is not installed: '.$initial);
        }

        $this->logVerbose(sprintf('Updating Contao sources for %s', $initial->getName()));

        $contaoRoot = $this->getContaoRoot();

        $this->removeSymlinks($initial, $contaoRoot, $this->getSources($initial));

        parent::update($repo, $initial, $target);

        $this->addSymlinks($target, $contaoRoot, $this->getSources($target));
        $this->addCopies($target, $this->getFilesRoot(), $this->getUserFiles($target), self::DUPLICATE_IGNORE);
        $this->addRunonces($target, $this->getRunonces($target));

        $this->logVerbose('');
    }
public function update ( InstalledRepositoryInterface $ repo , PackageInterface $ initial , PackageInterface $ target ) { if ( ! $ repo -> hasPackage ( $ initial ) ) { throw new \ InvalidArgumentException ( 'Package is not installed: ' . $ initial ) ; } $ this -> logVerbose ( sprintf ( 'Updating Contao sources for %s' , $ initial -> getName ( ) ) ) ; $ contaoRoot = $ this -> getContaoRoot ( ) ; $ this -> removeSymlinks ( $ initial , $ contaoRoot , $ this -> getSources ( $ initial ) ) ; parent :: update ( $ repo , $ initial , $ target ) ; $ this -> addSymlinks ( $ target , $ contaoRoot , $ this -> getSources ( $ target ) ) ; $ this -> addCopies ( $ target , $ this -> getFilesRoot ( ) , $ this -> getUserFiles ( $ target ) , self :: DUPLICATE_IGNORE ) ; $ this -> addRunonces ( $ target , $ this -> getRunonces ( $ target ) ) ; $ this -> logVerbose ( '' ) ; }
Remove symlinks for Contao sources before update, then add them again afterwards.

{@inheritdoc}

@throws \InvalidArgumentException When the requested package is not installed.
Remove symlinks for Contao sources before update then add them again afterwards .