WellCommerce\Bundle\DistributionBundle\Manager\PackageManager::syncPackage PHP Method

syncPackage() protected method

Syncs single remote package
protected syncPackage ( Package $remotePackage )
$remotePackage Packagist\Api\Result\Package
    protected function syncPackage(RemotePackage $remotePackage)
    {
        $repository = $this->getRepository();
        $localPackage = $repository->findOneBy(['fullName' => $remotePackage->getName()]);
        if (!$localPackage instanceof PackageInterface) {
            $this->addPackage($remotePackage);
        } else {
            $this->setPackageVersions($localPackage);
            $this->getDoctrineHelper()->getEntityManager()->flush();
        }
    }