Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires phpoffice/phpword ^0.18.3, found phpoffice/phpword[0.18.3] but the package is fixed to v0.14.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require phpoffice/phpspreadsheet:*" to figure out if any version is installable, or "composer require phpoffice/phpspreadsheet:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
还是老话,百度上基本没有答案,那怎么办呢,还是依靠自己吧。
仔细阅读英文,发现提示 composer.json 定义的版本是 0.18.3, 而同级下 composer.lock 却把版本锁定在了 0.14.0,据此把 composer.lock 版本改成一样的 ,就 OK了。