Larastan: Error installing into an existing project

Created on 24 Jul 2018  ยท  8Comments  ยท  Source: nunomaduro/larastan

Hey @nunomaduro

I am receiving the following errors when attempting to install into an existing 5.6 project. I can get it installed with a new fresh 5.6 app

  Problem 1
    - Installation request for nunomaduro/larastan ^0.2.3 -> satisfiable by nunomaduro/larastan[v0.2.3].
    - Conclusion: remove symfony/process v4.0.9
    - Conclusion: don't install symfony/process v4.0.9
    - nunomaduro/larastan v0.2.3 requires symfony/process ^4.1 -> satisfiable by symfony/process[4.1.x-dev, 4.2.x-dev, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1, v4.1.2].
    - Can only install one of: symfony/process[4.1.x-dev, v4.0.9].
    - Can only install one of: symfony/process[4.2.x-dev, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0-BETA1, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0-BETA2, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0-BETA3, v4.0.9].
    - Can only install one of: symfony/process[v4.1.1, v4.0.9].
    - Can only install one of: symfony/process[v4.1.2, v4.0.9].
    - Installation request for symfony/process (locked at v4.0.9) -> satisfiable by symfony/process[v4.0.9].
question

All 8 comments

@mikeerickson That is the normal composer behaviour. Try: composer require nunomaduro/larastan --update-with-all-dependencies.

@nunomaduro I had tried that as well (see below)

โฏ composer require nunomaduro/larastan --update-with-all-dependencies
Using version ^0.2.3 for nunomaduro/larastan
./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 nunomaduro/larastan ^0.2.3 -> satisfiable by nunomaduro/larastan[v0.2.3].
    - Conclusion: remove symfony/process v4.0.9
    - Conclusion: don't install symfony/process v4.0.9
    - nunomaduro/larastan v0.2.3 requires symfony/process ^4.1 -> satisfiable by symfony/process[4.1.x-dev, 4.2.x-dev, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1, v4.1.2].
    - Can only install one of: symfony/process[4.1.x-dev, v4.0.9].
    - Can only install one of: symfony/process[4.2.x-dev, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0-BETA1, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0-BETA2, v4.0.9].
    - Can only install one of: symfony/process[v4.1.0-BETA3, v4.0.9].
    - Can only install one of: symfony/process[v4.1.1, v4.0.9].
    - Can only install one of: symfony/process[v4.1.2, v4.0.9].
    - Installation request for symfony/process (locked at v4.0.9) -> satisfiable by symfony/process[v4.0.9].

@mikeerickson You need to remove your composer.lock and then composer require nunomaduro/larastan.

I did as suggested, removed the composer.lock file, but still no luck, this is what I get:

Problem 1
    - nunomaduro/larastan v0.2.4 requires phpstan/phpstan ^0.10.2 -> satisfiable by phpstan/phpstan[0.10.2].
    - Installation request for nunomaduro/larastan ^0.2.4 -> satisfiable by nunomaduro/larastan[v0.2.4].
    - Conclusion: remove nikic/php-parser v3.1.5
    - Conclusion: don't install nikic/php-parser v3.1.5
    - phpstan/phpstan 0.10.2 requires nikic/php-parser ^4.0.2 -> satisfiable by nikic/php-parser[v4.0.2, v4.0.3].
    - Can only install one of: nikic/php-parser[v4.0.2, v3.1.5].
    - Can only install one of: nikic/php-parser[v4.0.3, v3.1.5].
    - Installation request for nikic/php-parser (locked at v3.1.5) -> satisfiable by nikic/php-parser[v3.1.5].

Tried removing the package as per the conclusion, but again I don't even have that package listed in my composer.json so it won't be removed if I run the command.

You should figure out who requires nikic/php-parser v3.1.5.

@nakovdev Have you tried to remove Larastan manually from the vendor folder? Had a similar issue on another Laravel installation (something was canceled) and afterwards everything was fixed.

Thanks @ondrejmirtes! I updated each dependency that is required by larastan but was used by other packages as well manually, now it works.

@ForzaSFerrari I could not even install it at first.

I ran into this exact same problem. I solved it by running composer update first.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grcasanova picture grcasanova  ยท  4Comments

bogdankharchenko picture bogdankharchenko  ยท  4Comments

Gummibeer picture Gummibeer  ยท  3Comments

hailwood picture hailwood  ยท  4Comments

zlodes picture zlodes  ยท  3Comments