Reputation: 1666
I used How to require a fork with composer and https://getcomposer.org/doc/05-repositories.md#vcs to come up with the composer.json file below. I forked a lib to update the composer.json file and it is not loading mine. It is loading the original repo.
"repositories": [{
"type": "vcs",
"url": "https://github.com/Dylan-Buth/gopher"
}],
"require": {
"laravel/framework": "~5.0",
"indatus/gopher": "1.*"
},
Upvotes: 0
Views: 461
Reputation: 5643
Even after you fork the repository, composer will still try to resolve version 1.*
. So it will get your forked repository, but it will look up the latest 1.*
version. Even if you put *
as the version requirement, it will still get the latest tag, not the latest commit.
If you want the latest commit, you can put dev-master
as the required version string. Alternatively you could modify the composer.json
in your forked package to "alias" the version you want:
{
"extra": {
"branch-alias": {
"dev-master": "1.1"
}
}
}
Upvotes: 2