error when installing dingo / api

1

I'm trying to install dingo / api for an api rest in laravel 5.1 but when I execute composer require dingo/api:1.0.x@dev it throws me this error:

Your requirements could not be resolved to an installable set of packages.

  

Problem 1

     
  • dingo / api 1.0.x-dev requires dingo / blueprint 0.2. * - > satisfiable by dingo / blueprint [0.2.x-dev] but these conflicts with your requirements or minimum-stability.      
    • Conclusion: do not install dingo / api v1.0.0-beta3
    •   
    • Conclusion: do not install dingo / api v1.0.0-beta2
    •   
    • Conclusion: remove phpdocumentor / reflection-docblock 3.1.0
    •   
    • Installation request for dingo / api 1.0.x@dev - > satisfiable by dingo / api [1.0.x-dev, v1.0.0-beta1, v1.0.0-beta2, v1.0.0-beta3].
    •   
    • Conclusion: do not install phpdocumentor / reflection-docblock 3.1.0
    •   
    • dingo / api v1.0.0-beta1 requires phpdocumentor / reflection-docblock 2.0. * - > satisfiable by phpdocumentor / reflection-docblock [2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4].
    •   
    • Can only install one of: phpdocumentor / reflection-docblock [2.0.0, 3.1.0].
    •   
    • Can only install one of: phpdocumentor / reflection-docblock [2.0.1, 3.1.0].
    •   
    • Can only install one of: phpdocumentor / reflection-docblock [2.0.2, 3.1.0].
    •   
    • Can only install one of: phpdocumentor / reflection-docblock [2.0.3, 3.1.0].
    •   
    • Can only install one of: phpdocumentor / reflection-docblock [2.0.4, 3.1.0].
    •   
    • Installation request for phpdocumentor / reflection-docblock (locked at 3.1.0) - > satisfiable by phpdocumentor / reflection-docblock [3.1.0].
    •   
  •   
Installation failed, reverting ./composer.json to its original content.

I do not know why this is, thanks in advance ...

here the content of my composer.json:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "dingo/api": "1.0.x@dev"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\Foundation\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\Foundation\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}
}
    
asked by Jose Parra 28.06.2016 в 19:10
source

2 answers

0

ok I got the answer I just had to add to the composer.json's require the phpdocumentor/reflection: 3.x@dev and then the dingo/api:1.0.x@dev and run composer update and everything worked fine, that's how the composer.json was:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "phpdocumentor/reflection": "3.x@dev",
    "dingo/api": "1.0.x@dev"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\Foundation\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\Foundation\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}
}
    
answered by 28.06.2016 / 20:26
source
0

Add "phpdocumentor / reflection": "3.x@dev" under "require": {} in composer.json and run to composer update

"require": {

    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "phpdocumentor/reflection": "3.x@dev"

},

$ composer update $ composer require dingo / api: 1.0.x@dev

after successful command this will add "dingo / api": "1.0.x@dev" under require.

"require": {

    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "phpdocumentor/reflection": "3.x@dev",
    "dingo/api": "1.0.x@dev"

}

    
answered by 27.07.2016 в 07:52