Composer package vs git branch

I’m upgrading Pimcore (using composer) from v5.6.4 to v5.8.0.
I encountered a database migration issue which I could fix by changing this file:
vendor/pimcore/pimcore/bundles/CoreBundle/Resources/migrations/Version20190408084129.php

So I decided to make a pull request on github to branch 5.8
But I discovered that the exact fix was already made and pushed.

So wondering how does the composer version relate to pimcore branches? Maybe with git tags?
Also how can I update v5.8.0 composer package with the above fix?

the latest version is 5.8.6, so why not update to it?

Thanks Dominik. I’ve done that. Works!