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.
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.