public function __construct($path, array $versions)
{
Assert::stringNotEmpty($path, 'The Puli path must be a non-empty string. Got: %s');
Assert::allIsInstanceOf($versions, 'Puli\\Repository\\Api\\Resource\\PuliResource');
Assert::greaterThanEq(count($versions), 1, 'Expected at least one version.');
$this->path = $path;
$this->versions = array_values($versions);
}