original_string: 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('');
      }
code: 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('');
      }
code_tokens: 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 ( '' ) ; }
docstring: Remove symlinks for Contao sources before update, then add them again afterwards.
  
  {@inheritdoc}
  
  @throws \InvalidArgumentException When the requested package is not installed.
docstring_tokens: Remove symlinks for Contao sources before update then add them again afterwards .