Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Git/PickLastMinorVersionFromCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public function assert(Version $version): bool
return ! $version->isPreRelease();
}
});

if ($stableVersions->isEmpty()) {
throw new \Exception('Your library does not have any minor version');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a crash really the best approach? Perhaps it should be "green" when no BC breaks are detected instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. That's why I kinda put it as a draft with WIP. And yes when there is no stable version - there won't be any BC breaks. Note or Info message could be applied.

Stay tuned 😄

}

$versionsSortedDescending = $stableVersions->sortedDescending();

Expand Down