sebastian-mollie / SyliusMolliePlugin-DO-NOT-USE-

OLD Sylius Mollie payment gateway integration. Please use the newest version. I will be closing this repo by the end of the year.
https://github.com/mollie/Sylius/releases/tag/v5.0.0
MIT License
1 stars 4 forks source link

Cannot install the plugin using Composer #281

Closed ristokekovic closed 2 years ago

ristokekovic commented 2 years ago

Hello

I am trying to set up Mollie plugin version 4.0.1 on Sylius 1.11.0 and PHP 8.0. I also have the SyliusRefund version 1.1. However, when I try to install the plugin with Composer, following the installation instructions, I keep getting conflict errors:

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

  Problem 1
    - friendsofsymfony/jsrouting-bundle[2.2.0, ..., 2.4.0] require php ^5.3.9|^7.0 -> your php version (8.0.20) does not satisfy that requirement.
    - friendsofsymfony/jsrouting-bundle[2.5.0, ..., 2.6.0] require php ^7.1 -> your php version (8.0.20) does not satisfy that requirement.
    - friendsofsymfony/jsrouting-bundle 2.7.0 requires willdurand/jsonp-callback-validator ~1.0 -> found willdurand/jsonp-callback-validator[v1.0.0, v1.1.0] but the package is fixed to v2.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - friendsofsymfony/jsrouting-bundle 2.8.0 requires willdurand/jsonp-callback-validator ~1.1 -> found willdurand/jsonp-callback-validator[v1.1.0] but the package is fixed to v2.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - bitbag/mollie-plugin v4.0.1 requires sylius/admin-order-creation-plugin ^0.13 -> satisfiable by sylius/admin-order-creation-plugin[v0.13.0].
    - sylius/admin-order-creation-plugin v0.13.0 requires friendsofsymfony/jsrouting-bundle ^2.2 -> satisfiable by friendsofsymfony/jsrouting-bundle[2.2.0, ..., 2.8.0].
    - Root composer.json requires bitbag/mollie-plugin 4.0.1 -> satisfiable by bitbag/mollie-plugin[v4.0.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

When I try to use the --with-all-dependencies flag, as suggested in the failure description, the installation does go through, but my store completely goes down after that, and every page throws a 500 server error with a message that the server redirected me too many times.

Can you please help? I tried multiple different versions of Sylius and Mollie plugins, but the result is always the same.

EdouardBayon commented 2 years ago

Morning @Ahahodura or @marekrzytki ,

Any chance you guys could take a look at this request ?

Thanks

senghe commented 2 years ago

Hi @ristokekovic and @EdouardBayon. I've already investigated something in this case.

There is an issue with version of willdurand/jsonp-callback-validator library. From any reason in your composer.lock file it's locked by the version, which is too high for one of our sub-dependencies. I've installed fresh Sylius 1.11 and had the same problem.

In my case I've removed composer.lock file from a project and then did composer require bitbag/mollie-plugin, which was executed correctly.

If there's any problem after plugin installation, I would recommend to share the error message or something that would make us better in helping you.

mdeboer commented 2 years ago

@senghe that could be tricky though. Imho a better way is to install with

composer require bitbag/mollie-plugin -w --no-scripts

Note the lowecase -w or --update-with-dependencies. This will install the plugin correctly and update the dependencies that caused the trouble. Do not use -W or --update-with-all-dependencies as that will throw an even bigger error.

Imho the docs should be updated and this can be closed unless I run into issues later lol.

ristokekovic commented 2 years ago

Thanks, that seems to solve it!