在CRMEB项目上,想安装新的包,运行:
composer require yansongda/pay -vvv
出现提示
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package overtrue/wechat (locked at 3.3.33, required as ^4.2.33) is satisfiable by overtrue/wechat[3.3.33] but these conflict with your requirements or minimum-stability.
Problem 2
- The requested package symfony/event-dispatcher (locked at v2.8.52, required as ^5.2) is satisfiable by symfony/event-dispatcher[v2.8.52] but these conflict with your requirements or minimum-stability.
想升级overtrue/wechat
composer update overtrue/wechat
出现提示
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package symfony/event-dispatcher (locked at v2.8.52, required as ^5.2) is satisfiable by symfony/event-dispatcher[v2.8.52] but these conflict with your requirements or minimum-stability.
根据提示,又想升级symfony/event-dispatcher
composer update symfony/event-dispatcher
又出现提示:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package overtrue/wechat (locked at 3.3.33, required as ^4.2.33) is satisfiable by overtrue/wechat[3.3.33] but these conflict with your requirements or minimum-stability.
两个包死咬在一起,无法升级,想删除之后重新引入
composer remove overtrue/wechat
出现提示
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package symfony/event-dispatcher (locked at v2.8.52, required as ^5.2) is satisfiable by symfony/event-dispatcher[v2.8.52] but these conflict with your requirements or minimum-stability.
死循环,两个死都要咬在一起,咋办捏?
解决办法,先把旧的彻底删除掉,然后重新安装组件
composer remove overtrue/wechat symfony/event-dispatcher --update-no-dev
注意的是,在remove的时候使用 --update-no-dev这个参数就可以了,具体原因未详细了解,将来有时间再看,重点就是这个参数了
另外使用composer remove掉的组件,有可能需要手工删除composer.lock和vendor/composer/installed.json文件中的相应内容,然后安装组件时,才可以安装新版本的组件