/** * Fetches all versions available to all repositories in the stack and returns them as a Linked collection. * * The returned collection contains versions groups sequentially into groups that correspond to each sub-repository. * Each of those groups is sorted with the repository's own comparator. Therefore, its strongly recommended not to * sort or modify the resulting collection. * * @return Collection */ public function fetchAll() { $collection = new Collection(); foreach ($this->getRepositories() as $repo) { /** @var MigrationRepositoryInterface $repo */ $versions = $repo->fetchAll(); $collection->merge($versions); } return $collection; }