I've got some packages host on the Gitlab of my company. I want to request a specific version of these packages but each time I try, composer download the latest commit of the master branch.
composer.json :
{
"name" : "MyProject",
"require" : {
"user/project" : "v0.5.0"
},
"type" : "project",
"repositories" : [
{
"url" : "git@gitlab.XXXX.fr:user/project.git",
"type" : "vcs"
}
],
"config" : {
"vendor-dir" : "private/class"
}
}
The structure of the repository of my package :
- tag v0.5.0 : commit dd6ed3c8...
- commit X,Y,Z
- tag v0.7.0 : commit 15293ac6...
- last commit f15600a1...
When I execute "composer install" :
Loading composer repositories with package information
Installing dependencies (including require-dev)
Analyzed 69 packages to resolve dependencies
Analyzed 67 rules to resolve dependencies
Installing user/project (dev-master f15600a)
Cloning f15600a1
It downloads the last commit only.
How can I configure the composer.json file of my project to use a specific tag ?