1

estoy tratando de instalar dingo/api para una api rest en laravel 5.1 pero cuando ejecuto composer require dingo/api:1.0.x@dev me lanza este 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 conflict with your requirements or minimum-stability.
    • Conclusion: don't install dingo/api v1.0.0-beta3
    • Conclusion: don't 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: don't 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.

no se a qué se deba esto, gracias de antemano...

aquí el contenido de mi 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"
}
}
3
  • Agrega el contenido de tu composer.json a la pregunta (editándola) para poder darte una mejor respuesta.
    – Shaz
    Commented el 28 jun. 2016 a las 17:16
  • si listo ya edite la pregunta
    – Jose Parra
    Commented el 28 jun. 2016 a las 17:33
  • Hola el error se puede deber a una falla en la compatibilidad, si usas xampp o wampserver debes usar la versión que contenga php7 o en su defecto php5, para no tener problemas a futuro Commented el 12 ene. 2022 a las 15:46

2 respuestas 2

0

ok conseguí la respuesta solo debía agregar al require del composer.json el phpdocumentor/reflection: 3.x@dev y luego el dingo/api:1.0.x@dev y ejecutar composer update y listo todo funcionó bien, así quedó el 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.*",
    "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"
}
}
0

Add "phpdocumentor/reflection": "3.x@dev" under "require": { } in composer.json and run a 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"

}

1
  • Hi Mohammad. This site is for Spanish communication in all content: questions, answers, comments, etc. Please edit your answers and use Spanish, otherwise the post will be removed.
    – user227
    Commented el 27 jul. 2016 a las 14:58

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.