user796443
user796443

Reputation:

packagist complains on new package InvalidArgumentException

my first package for composer in packagist. I actually wrote it for my own project, but I cannot use it anywhere!

when I do

composer require wearede/tbcpay-php

it complains

 [InvalidArgumentException]                                                                       
  Could not find package wearede/tbcpay-php at any version for your minimum-stability (stable). C  
  heck the package spelling or your minimum-stability                                              

since this is my first composer package, i'm at loss.

Upvotes: 3

Views: 362

Answers (2)

Wouter J
Wouter J

Reputation: 41934

As you can see on packagist, your package doesn't have any stable releases (versions). It only has a master branch (branches are prefixed with dev- in Composer/Packagist).

So there are 2 solutions:

  • Create a release of your package, by creating a git tag. E.g: git tag v1.0.0; git push origin --tags
  • Allow to install unstable packages by adding "minimum-stability": "dev" to the application's composer.json file (as mentioned by @NickOS)

Upvotes: 4

NickOS
NickOS

Reputation: 804

This seems to be a setting in the composer.json file in the tbcpay-php bundle

"minimum-stability" : "dev"

Which defines your dev branch as stable, and looks for a stable branch to install the package.

You can read more about the stability flags here:

https://igor.io/2013/02/07/composer-stability-flags.html

Upvotes: 0

Related Questions