【发布时间】:2019-06-10 07:35:04
【问题描述】:
我正在将 SilverStripe 3.6.5 的实例升级到 SS 4.x,并且我一直遵循安装SilverStripe upgrader 的建议。
但在我的 Windows 开发盒上运行 composer global require silverstripe/upgrader 会产生以下结果:
Using version ^1.4 for silverstripe/upgrader
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing silverstripe/upgrader (1.4.1): Downloading (100%)
Failed to download silverstripe/upgrader from dist: There was an error extracting the ZIP file, it is either corrupted or using an invalid format.
Now trying to download from source
- Installing silverstripe/upgrader (1.4.1): Cloning 84226286c8 from cache
Installation failed, reverting ./composer.json to its original content.
我正在使用这个堆栈:
- Windows 8.1
- PHP 7.1.26
- 作曲家 1.8.5
- git 版本 2.21.0.windows.1
此时我在全局范围内没有 Composer 包。
我也尝试过(无济于事)是卸载作曲家,清除所有缓存和文件夹,然后重新开始下载 Composer-Setup.exe 并在安装完成后立即再次尝试composer global require silverstripe/upgrader命令行。结果与 silverstripe/upgrader 相同,即使所有其他软件包(我猜它的依赖项)都下载并安装得很好。例如,这是重新启动后命令行输出的摘录:
Changed current directory to C:/Users/Amenel/AppData/Roaming/Composer
Using version ^1.4 for silverstripe/upgrader
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 35 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.4.0): Downloading (100%)
- Installing composer/ca-bundle (1.1.4): Downloading (100%)
- Installing padraic/humbug_get_contents (1.1.2): Downloading (100%)
- Installing padraic/phar-updater (v1.0.6): Downloading (100%)
- Installing symfony/polyfill-ctype (v1.11.0): Downloading (100%)
- Installing symfony/filesystem (v4.3.1): Downloading (100%)
...
当我对它执行网络搜索时,我似乎找不到与此特定错误相关的任何内容。
另外值得注意的是:当我指定以前版本的 silverstripe/upgrader 时也会报告此错误,例如1.3.0.
总结一下,我的问题是无法启动升级过程,因为通过composer安装升级程序失败。
【问题讨论】: