Composer only finds latest version (tag) of Gitlab hosted package -
i have created package annotated tags versioning (1.0.0, 1.0.1, 1.1.0 , 2.0.0). package lives on own hosting (so not via packagist) when trying require package, composer finds 2.0.0 version , fails on other version requirement.
composer.php file of project using package
{ "name": "projectname", "description": "description.", "keywords": ["keys"], "license": "licence", "type": "project", "require": { ... "space/package-name": "~1.0" // tried 1.0.0, 1.0.*, ~1.0@dev - 2.0.0 works } "repositories": [ ... { "type": "git", "url": "git@gitlab.com:space/package-name.git" // make sure package found on specific hosting } ], "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }
on running composer show "space/package-name"
versions: * 2.0.0
. upon update, composer produces following error:
the requested package space/package-name ~1.0 exists name/package- name[2.0.0, dev-master] these rejected constraint.
it looks composer no able find other version latest, way of fixing this?
things checked:
- the package not contain version in composer.json (that might conflict git tag)
- used tags annotated tags , pushed repo.
updates: might gitlab - composer issue, see comment.
Comments
Post a Comment