dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.32k stars 1.25k forks source link

Laravel 7 installation #1713

Closed mehrdad-shokri closed 4 years ago

mehrdad-shokri commented 4 years ago
Q A
Bug? no
New Feature? no
Framework Laravel
Framework version 7.0.4
Package version 2.4.5
PHP version 7.4.0

Actual Behaviour

Apparently laravel is using Illuminate/routin version 7 and dingo requires version 5 || 6

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

  Problem 1
    - Conclusion: don't install dingo/api v2.4.5
    - Conclusion: don't install dingo/api v2.4.4
    - Conclusion: don't install dingo/api v2.4.3
    - Conclusion: don't install dingo/api v2.4.2
    - Conclusion: don't install dingo/api v2.4.1
    - Conclusion: don't install dingo/api v2.4.0
    - Conclusion: don't install dingo/api v2.4.0-rc2
    - Conclusion: remove laravel/framework v7.0.4
    - Installation request for dingo/api ^2.4 -> satisfiable by dingo/api[v2.4.0, v2.4.0-rc1, v2.4.0-rc2, v2.4.1, v2.4.2, v2.4.3, v2.4.4, v2.4.5].
    - Conclusion: don't install laravel/framework v7.0.4
    - dingo/api v2.4.0-rc1 requires illuminate/routing ^5.5 || ^6.0 -> satisfiable by illuminate/routing[5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, 6.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0].

Expected Behaviour

Install the thing

Steps to Reproduce

composer require dingo/api

Possible Solutions

udate Illuminate/rouing to version 7!

bbashy commented 4 years ago

There's a PR for this https://github.com/dingo/api/pull/1715

specialtactics commented 4 years ago

Dingo currently doesn't support version 7, stay tuned, will be shortly done.

specialtactics commented 4 years ago

You can test now, please see https://github.com/dingo/api/issues/1721

bbashy commented 4 years ago

@specialtactics Can install v3.0.0-rc2 but I'm using spatie/laravel-fractal and it requires https://github.com/spatie/fractalistic which uses "league/fractal": "^0.19.0"

This package requires ^0.17

composer require dingo/api "^3.0.0"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for league/fractal (locked at 0.19.2) -> satisfiable by league/fractal[0.19.2].
    - dingo/api v3.0.0-rc1 requires league/fractal ^0.17 -> satisfiable by league/fractal[0.17.0].
    - dingo/api v3.0.0-rc2 requires league/fractal ^0.17 -> satisfiable by league/fractal[0.17.0].
    - Conclusion: don't install league/fractal 0.17.0
    - Installation request for dingo/api ^3.0.0 -> satisfiable by dingo/api[v3.0.0-rc1, v3.0.0-rc2].

Installation failed, reverting ./composer.json to its original content.
specialtactics commented 4 years ago

@bbashy Actually, I will update that requirement

bbashy commented 4 years ago

Completely unrelated? Your package installs an old version of a package. How do I get around that?

specialtactics commented 4 years ago

@bbashy Yes you're right, because fractal is in v0. for major, it doesn't have like it does for non-dev versions, it will need to be updated.

specialtactics commented 4 years ago

@bbashy Updated & tagged

bbashy commented 4 years ago

Thanks, I got past that one now. New issue;

composer require dingo/api "3.0.0-rc3" -vv
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 0.083 seconds
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - dingo/api v3.0.0-rc3 requires dingo/blueprint ^0.4 -> satisfiable by dingo/blueprint[v0.4.0].
    - Conclusion: remove phpdocumentor/reflection-common 2.0.0
    - Conclusion: don't install phpdocumentor/reflection-common 2.0.0
    - phpdocumentor/reflection-docblock 3.1.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.1.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.2 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.3 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.3.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.3.2 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.1.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.1.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.2.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.3.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.3.1 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - Can only install one of: phpdocumentor/reflection-common[1.0, 2.0.0].
    - Can only install one of: phpdocumentor/reflection-common[1.0.1, 2.0.0].
    - Installation request for phpdocumentor/reflection-common (locked at 2.0.0) -> satisfiable by phpdocumentor/reflection-common[2.0.0].
    - Installation request for dingo/api 3.0.0-rc3 -> satisfiable by dingo/api[v3.0.0-rc3].
    - Conclusion: don't install phpdocumentor/reflection-docblock 5.1.0|install phpdocumentor/reflection-docblock 3.1.0|install phpdocumentor/reflection-docblock 3.1.1|install phpdocumentor/reflection-docblock 3.2.0|install phpdocumentor/reflection-docblock 3.2.1|install phpdocumentor/reflection-docblock 3.2.2|install phpdocumentor/reflection-docblock 3.2.3|install phpdocumentor/reflection-docblock 3.3.0|install phpdocumentor/reflection-docblock 3.3.2|install phpdocumentor/reflection-docblock 4.1.0|install phpdocumentor/reflection-docblock 4.1.1|install phpdocumentor/reflection-docblock 4.2.0|install phpdocumentor/reflection-docblock 4.3.0|install phpdocumentor/reflection-docblock 4.3.1
    - Conclusion: remove phpdocumentor/reflection-docblock 5.1.0|install phpdocumentor/reflection-docblock 3.1.0|install phpdocumentor/reflection-docblock 3.1.1|install phpdocumentor/reflection-docblock 3.2.0|install phpdocumentor/reflection-docblock 3.2.1|install phpdocumentor/reflection-docblock 3.2.2|install phpdocumentor/reflection-docblock 3.2.3|install phpdocumentor/reflection-docblock 3.3.0|install phpdocumentor/reflection-docblock 3.3.2|install phpdocumentor/reflection-docblock 4.1.0|install phpdocumentor/reflection-docblock 4.1.1|install phpdocumentor/reflection-docblock 4.2.0|install phpdocumentor/reflection-docblock 4.3.0|install phpdocumentor/reflection-docblock 4.3.1
    - dingo/blueprint v0.4.0 requires phpdocumentor/reflection-docblock ^3.1|^4.1 -> satisfiable by phpdocumentor/reflection-docblock[3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.3.0, 3.3.2, 4.1.0, 4.1.1, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[4.3.2, 5.1.0].
    - Can only install one of: phpdocumentor/reflection-docblock[4.3.3, 5.1.0].
    - Can only install one of: phpdocumentor/reflection-docblock[4.3.4, 5.1.0].
    - Installation request for phpdocumentor/reflection-docblock (locked at 5.1.0) -> satisfiable by phpdocumentor/reflection-docblock[5.1.0].

Installation failed, reverting ./composer.json to its original content.

Don't really understand that well enough to know what the solution is.

specialtactics commented 4 years ago

@bbashy You can need to update all packages involved, ie. composer update dingo/api phpdocumentor/reflection-docblock

Your version of reflection dockblock is locked at 5.1, which is more up to date than what blueprint supports. The above could potentially work, alternatively I could allow version 5 in dingo blueprint, but I'm not sure what repercussions that would have. I will try anyway since I think doc generation is not overly working at the moment.

specialtactics commented 4 years ago

@bbashy Try again plz

bbashy commented 4 years ago

Thanks, able to install it now;

composer require dingo/api "^3.0"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
  - Installing doctrine/annotations (v1.8.0): Downloading (100%)
  - Installing dingo/blueprint (v0.4.1): Downloading (100%)
  - Installing dingo/api (v3.0.0-rc3): Downloading (100%)
dingo/api suggests installing tymon/jwt-auth (Protect your API with JSON Web Tokens.)
Writing lock file