protected function _resolveDependency($dep, \lib\Repository $repository)
 {
     $pkg = $repository->getPackage($dep['name']);
     if (isset($dep['minVersion']) && !version_compare($pkg->metadata()['version'], $dep['minVersion'], $dep['minVersionOperator'])) {
         return;
     }
     if (isset($dep['maxVersion']) && !version_compare($pkg->metadata()['version'], $dep['maxVersion'], $dep['maxVersionOperator'])) {
         return;
     }
     return $pkg;
 }