protected function findTag(Repository $repository, $tag)
 {
     $tags = (array) $repository->getTags();
     $tagExpression = new SemanticExpression($tag);
     return $this->getMappedVersionTag($tags, $tagExpression->maxSatisfying($tags));
 }