Sylius / ShopApiPlugin

Shop API for Sylius.
https://sylius.com
129 stars 89 forks source link

Composer require error #629

Closed LudoMon closed 4 years ago

LudoMon commented 4 years ago

I try to create a new project using your great plugin, thanks for it!

I run

composer create-project sylius/sylius-standard my-project cd my-project composer require sylius/shop-api-plugin

Composer (version 1.9.2) returns with the following error:

Using version ^1.0 for sylius/shop-api-plugin ./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

  • sylius/shop-api-plugin v1.0.0 conflicts with phpstan/phpstan-webmozart-assert[0.11.3].
  • sylius/shop-api-plugin v1.0.0 conflicts with phpstan/phpstan-webmozart-assert[0.11.3].
  • sylius/shop-api-plugin v1.0.0 conflicts with phpstan/phpstan-webmozart-assert[0.11.3].
  • Installation request for sylius/shop-api-plugin ^1.0 -> satisfiable by sylius/shop-api-plugin[v1.0.0].
  • Installation request for phpstan/phpstan-webmozart-assert (locked at 0.11.3, required as ^0.11.2) -> satisfiable by phpstan/phpstan-webmozart-assert[0.11.3]. Installation failed, reverting ./composer.json to its original content.

I do not really understand the message, phpstan/phpstan-webmozart-assert 0.11.3 seems to match all the requirements.

Could you help me ?

Thank you

mamazu commented 4 years ago

Can you try to run composer require sylius/shop-api-plugin --update-with-dependencies

LudoMon commented 4 years ago

Thank you for your time and the quick answer

I tried the --update-with-dependencies as you suggest, but I have the exactly same error message...

I run these commands on Windows 10, do you think this is why I have the problem ?

mamazu commented 4 years ago

This might also be a problem with the vendor folder. I'd suggest removing the vendor folder and the composer.lock file and then running the require command again. If this doesn't help then I don't know.

LudoMon commented 4 years ago

Oh, I didn't try to delete both the vendor directory and the composer.lock file.

This updated some of the components installed by the composer create-project command, and it worked!

Thank you very much @mamazu for your time