vidy videni
vidy videni

Reputation: 271

how to find the right version constraint in composer-php for repo in github?

I am trying to install package Payum/PayumBundle,I add

"require-dev": {
    "payum/payum-bundle": "1.0.0-BETA2"
  }

to indicate I also need to download dev version.

this gives me an error:

 Problem 1
- The requested package payum/payumbundle could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

how do we find the right version constraint from git tag ,branches? what I tried :
2. tried the version constraint following

 1.0.*@beta , 1.0.0 , 1.0.*@beta ,1.0.*@dev,1.0.0@beta

the result is still the same

the latest tag for this project is
1.0.0-BETA2

what is the correct version constraint for this? this post explains what a version constraint can be , but it doesn't explain how to find the right version constraint from git tag.

Upvotes: 1

Views: 227

Answers (1)

Tomas Votruba
Tomas Votruba

Reputation: 24280

The easier way how to get proper version name, is go to package detail on packagist.org.

There you'll find out there are no BETA tags available. It might be caused by not triggering autoupdate by Github.

You can see, the last dev version is: 1.0.x-dev

So this command would normally do the trick:

composer require payum/payum-bundle:1.0.x-dev   

But this package depends on another dev package, so you need to mention them both in your composer.json. Like this:

{
    "require": {
        "payum/payum-bundle": "1.0.x-dev",
        "payum/core": "1.0.x-dev"
    }
}

And run:

composer update

That's all :). Verified!

Upvotes: 1

Related Questions