Amine Jallouli
Amine Jallouli

Reputation: 3959

api recipe can't be installed due to minimum-stability

I would like to use api-platform/api-platform in my flex-enabled symfony application. To do so, I run the following commands:

# creation of the flex-enable symfony application
composer create-project symfony/skeleton:3.3.* sf-flex

# installation of the api recip
composer req api

Unfortunately, I am getting this error message:

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

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []

To avoid that problem, I tried several solutions:

Solution 1

composer create-project symfony/skeleton:3.3.x-dev sf-flex
composer req api

SAME ERROR

Solution 2

composer create-project symfony/skeleton:3.3.x-dev sf-flex # a more recent version of symfony/skeleton
composer req --dev api

SAME ERROR

Solution 3

I tried to update the file composer.lock by changing that field as follows:

# "minimum-stability": "stable", # has been changed to to dev
"minimum-stability": "dev",

SAME ERROR

So, any proposal??

Thanks,

Upvotes: 0

Views: 206

Answers (1)

Amine Jallouli
Amine Jallouli

Reputation: 3959

Based on this page, I just changed composer.json by adding this line:

"type": "project",
    "license": "proprietary",
    "minimum-stability": "dev",    // the added line
    "require": {
        "php": "^7.1.3",
// ...

And the API recipe is installed without problems...

Upvotes: 0

Related Questions