【发布时间】:2018-05-06 16:14:29
【问题描述】:
几个月前,我在我的 cakephp 项目中使用 composer 安装了 PHPword。最近我们面临一些限制,为了我们的幸福,github 上的版本有很多满足我们需求的更新。
我们已尝试composer update,但最新版本仍然是 2016 版 之后我们尝试了这个:
composer require phpoffice/phpword:dev
结果是:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package phpoffice/phpword dev exists as phpoffice/phpword[0.
10.0, 0.10.1, 0.11.0, 0.11.1, 0.12.0, 0.7.0, 0.8.0, 0.8.1, 0.9.0, 0.9.1, dev-dev
elop, dev-master, v0.12.1, v0.13.0] but these are rejected by your constraint.
Installation failed, reverting ./composer.json to its original content.
编辑:我们需要 composer.json:
"require": {
"php": ">=5.6",
"cakephp/cakephp": "3.4.*",
"mobiledetect/mobiledetectlib": "2.*",
"cakephp/migrations": "~1.0",
"cakephp/plugin-installer": "*",
"mpdf/mpdf": "^6.1",
"tecnickcom/tcpdf": "^6.2",
"phpoffice/phpexcel": "^1.8",
"box/spout": "^2.7",
"cakecoded/ckeditor": "^1.0",
"phpoffice/phpword": "dev-master",
"dompdf/dompdf": "^0.8.0",
"fgrosse/phpasn1": "^2.0",
"sop/asn1": "^2.0",
"sop/x509": "^0.5.0"
},
那么,有没有办法获得即使在开发中的最新版本?
提前致谢!
【问题讨论】:
-
如果没有 composer.json 的
require部分,就不可能知道冲突的原因。
标签: php composer-php phpword