4.0 Upgrade Issue

Hello

I am trying to update my CakePHP version 3.3.11 to 4.X but I am not able to update my CakePHP version.

When I am trying to run this command ( PHP composer.phar require --dev --update-with-dependencies “phpunit/phpunit:^8.0”
)but I got some error Please Suggest me how can resolve this issue

Problem 1

  • phpunit/phpunit[8.2.0, …, 8.5.21] require sebastian/diff ^3.0.2 → satisfiable by sebastian/diff[3.0.2, 3.0.3].
  • phpunit/phpunit[8.0.0, …, 8.1.6] require sebastian/diff ^3.0 → satisfiable by sebastian/diff[3.0.0, 3.0.1, 3.0.2, 3.0.3].
  • You can only install one version of a package, so only one of these can be installed: sebastian/diff[1.1.0, …, 1.4.3, 2.0.1, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 4.0.0, …, 4.0.4].
  • rector/rector 0.10.20 requires sebastian/diff ^4.0.4 → satisfiable by sebastian/diff[4.0.4].
  • rector/rector is locked to version 0.10.20 and an update of this package was not requested.
  • Root composer.json requires phpunit/phpunit ^8.0 → satisfiable by phpunit/phpunit[8.0.0, …, 8.5.21].

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

you shouldn’t make that big of a jump.
try upgrading one minor version at a time and fix the deprecation warnings along the way.
When you reach 3.10 then go to 4.0, then 4.1 and finally 4.2

Besides there is a tool from dereuromark which helps you update all you dependencies at once.
https://toolbox.dereuromark.de/utilities/upgrade

I have upgrade step by step now it is working.

Thank you

1 Like