几个月前,我已经在CakePHP项目中使用了PHPWOWS。最近,我们面临一些局限性,为了我们的幸福,Github的版本有很多满足我们需求的更新。
我们尝试了作曲家更新,但最新版本仍然是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 require phpoffice/phpword:dev-master
如果那不起作用,请调整您的composer.json
以包括
{
"minimum-stability": "dev",
"prefer-stable: true
}
供参考,请参见
- https://getComposer.org/doc/04-schema.md#minimum-starity
- https://getcomposer.org/doc/04-schema.md#prefer-stable
注意
正如指出的那样,如果您与composer
安装软件包有关,则可以共享您的composer.json
,这样我们就可以更好地帮助您。
将依赖性添加到您的composer.json
{
"require": {
"phpoffice/phpword": "v0.13.*"
}
}
然后尝试运行
composer update
现在您可以使用版本Dev-Master,或等待几天才能获得官方的0.14版本。