Problem with WP Rocket and Composer in Bedrock

Hi there, following this guide : How to Set Up WP Rocket on Trellis and Bedrock? I’m having this issue :

composer require wp-media/wp-rocket --with-all-dependencies
Using version v3.9.1.1 for wp-media/wp-rocket
./composer.json has been updated
Running composer update wp-media/wp-rocket --with-all-dependencies
Loading composer repositories with package information
Updating dependencies                                 
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - pimple/pimple v3.4.0 requires psr/container ^1.1 -> found psr/container[1.1.0, 1.1.1, 1.1.x-dev] but it conflicts with another require.
    - rarst/wps 1.2 requires pimple/pimple ^3.2.3 -> satisfiable by pimple/pimple[v3.4.0].
    - rarst/wps is locked to version 1.2 and an update of this package was not requested.

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

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Any idea how I can fix this ? Cheers

Different versions of the same pimple/pimple package are required by that composer project at the same time. (In contrast to other packaging approaches (as npm/yarn), there can’t be multiple versions of the same package installed/used simultaneously.)
The pimple/pimple package v3.4.0 is required by the project itself, while the rarst/wps requires the same pimple/pimple package, but of different version ^3.2.3.

As a solution a newer version of the rarst/wps package has to be used that hopefully requires a newer pimple/pimple version, so the required version ranges of the two packages are compatible.
Alternatively you can downgrade the required pimple/pimple package in the project, so is compatible with the existing rarst/wps package requirements.

You can also, as proposed by the command output, invoke composer with the --with-all-dependencies (-W) flag so that it can upgrade existing packages if needed.

Edit:

Link to the rarst/wps packagist package repository:
https://packagist.org/packages/rarst/wps
The latest rarst/wps (1.2) requires pimple/pimple version ^3.2.3.

Link to the pimple/pimple packagist package repository:
https://packagist.org/packages/pimple/pimple

Thanks for your answer.
I had tried the --with-all-dependencies option, that’s where I got the error from.

There is no new version of https://packagist.org/packages/rarst/wps… So I guess my solutions are :

  • Ask for the maintainer to update or offer a pull request
  • Remove the Whoops error handler
  • Install WP Rocket without Composer

None are ideal but I’ll work it out ! Cheers

This topic was automatically closed after 42 days. New replies are no longer allowed.