mimzee
mimzee

Reputation: 99

Composer uses old package version

I have a custom package injected into my project via composer.json, this package is currently on version 2.0.1 I changed something in the source code of the package and set the version in the package.json to 2.0.2 pushed it to git and tried to update my composer but every time I get

      - Installing myproject/laravel-jssettings (v2.0.1): Cloning 9663e29ee0 from cache

even tho I cleared the composer cache and deleted the composer.lock file

The line in my composer.json file is

    "myproject/laravel-jssettings": "~2.0",

I tried to set it to

    "myproject/laravel-jssettings": "2.0.2", 

but then i get an error message which says

      Problem 1
- The requested package myproject/laravel-jssettings 2.0.2 exists as myproject/laravel-jssettings[v2.0.0, v2.0.1] but these are rejected by your constraint.

what do i miss here, where do i have to clear the cache or change to a new version so that the composer gets the new 2.0.2 version. thx in advance

Upvotes: 0

Views: 376

Answers (1)

sauron07
sauron07

Reputation: 161

You need to craete a tag for your custom repository. After that tag will be pushed to repositroy composer will get lates updates.

git tag 2.0.2
git push origin --tags

and after that try to composer update on your project. Composer documentation

Upvotes: 1

Related Questions