private function updateCompatibility(Addon $addon, AddonVersion $version, CompletePackage $package)
 {
     $require = null;
     if ($package->getRequire()) {
         foreach ($package->getRequire() as $name => $link) {
             if ((string) $link == 'self.version') {
                 continue;
             }
             if ($name == 'silverstripe/framework') {
                 $require = $link;
                 break;
             }
             if ($name == 'silverstripe/cms') {
                 $require = $link;
             }
         }
     }
     if (!$require) {
         return;
     }
     $addon->CompatibleVersions()->removeAll();
     $version->CompatibleVersions()->removeAll();
     foreach ($this->silverstripes as $id => $link) {
         try {
             $constraint = $this->versionParser->parseConstraints($require);
             if ($link->matches($constraint)) {
                 $addon->CompatibleVersions()->add($id);
                 $version->CompatibleVersions()->add($id);
             }
         } catch (Exception $e) {
             // An exception here shouldn't prevent further updates.
             Debug::log($addon->Name . "\t" . $addon->ID . "\t" . $e->getMessage());
         }
     }
 }