I share a CakePHP3.8 project, and I install and operate a common composer.lock with each Composer (v1.10.x), but I install it with a new computer Composer (v2.0.3) I got an error at that time. I'm sorry to ask you a question without detailed information on the error, but it was a migration package error.


I understand that if the major version of Composer changes, the compatibility of composer.lock will be impaired, but is it safe to assume that unifying the major version with Composer (v2.x.x) will prevent recurrence?getcomposer.org I couldn't find it even if I searched for it, so please let me know. Thank you.

  • Answer # 1

    As for the compatibility of lock files, it is as kawax's answer.

    To fix the error, CakePHP uses cakephp/plugin-installer to install CakePHP plugin packages.

    With Composer 2 or later, you need cakephp/plugin-installer 1.3 or higher to install the CakePHP plugin.composer updateOrcomposer require --dev cakephp/plugin-installer: ^ 1.3Please execute to upgrade the version.

  • Answer # 2

    There is lock compatibility.
    Since the cause is on the package side, it cannot be solved unless it is returned to composer 1.