Selim Reza
Selim Reza

Reputation: 1013

Could not find composer version for your minimum-stability (stable). Check the package spelling or your minimum-stability

I reviewed all questions and solutions in stack overflow. But I failed to resolve this issue. Error Message :

[InvalidArgumentException]
Could not find package selimppc/hello-world at any version for your
minimum-stability (stable). Check the package spelling or your minimum-stability

Here is my composer.json file ::

{
"name": "Hello worlds Apps",
"description": "New Apps from SelimReza.com",
"type": "library",
"license": "MIT",
"authors": [{
    "name": "Selim Reza",
    "email": "[email protected]"
}],
"require": {
    "php": ">=5.6",
    "selimppc/hello-world": "@dev"
},

"minimum-stability": "dev",
"prefer-stable": true,

"autoload": {
    "psr-4": {
        "HelloWorld\\": "src\\HelloWorld\\"
    }
}
}

Github URL : https://github.com/selimppc/hello-world

I can't imagine solution for this error. Also Please let me know the way to resolve and causes for this one.

Thanks in advance!

Upvotes: 1

Views: 4212

Answers (1)

Torsten
Torsten

Reputation: 752

dev-master is not a valid stability:

Available options (in order of stability) are dev, alpha, beta, RC, and stable.

See: https://getcomposer.org/doc/04-schema.md#minimum-stability

Also the package cannot refer to itself, you will have to change the name in your package.json.

If I change the name and the min-stability to dev. It works.

You won't need the repositories, they also refer to themself

{
"name": "some/new-name",
"description": "New Apps from SelimReza.com",
"type": "library",
"license": "MIT",
"authors": [{
"name": "Selim Reza",
"email": "[email protected]"
}],
"require": {
  "php": ">=5.6",
   "selimppc/hello-world": "dev-master"
},
"minimum-stability": "dev",
"prefer-stable": true,

"autoload": {
"psr-4": {
    "HelloWorld\\": "src\\HelloWorld\\"
  }
 }
}

Upvotes: 2

Related Questions