这是我第一次用作曲家。我试图构建一个使用它的项目,但我不能让作曲家正常工作。对于命令编写器的诊断,每次我得到以下信息:
PS C:\WinNMP\WWW\Oro> composer diagnose
Checking composer.json: WARNING
Defining autoload.psr-4 with an empty namespace prefix is a bad idea for performance
License "Commercial" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: FAIL
The disk hosting C:/Users/Mark/AppData/Roaming/Composer is full所有其他测试都返回OK。我的磁盘有64 My的空闲空间。我试着寻找这个问题,但没有发现什么帮助。在没有效果的黑暗中,我将php中的内存限制提高到512 as。一些与此相关的帖子暗示这是内存不足,但我的内存从未超过35%的使用率。
我试着运行composer清除缓存,但没有任何效果。
试图在php 7.2.6,composer 1.6.5上运行这个程序
发布于 2018-06-08 14:22:12
触发此错误消息的函数如下:
private function checkDiskSpace($config)
{
$minSpaceFree = 1024 * 1024;
if ((($df = @disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)
|| (($df = @disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)
) {
return '<error>The disk hosting '.$dir.' is full</error>';
}
return true;
}您可能希望编写一个进行相同检查的小脚本,但不需要错误抑制。要获取home和vendor-dir的值,可以运行以下命令:
composer config home
composer config vendor-dir粗略的想法:
$home = trim(`composer config home`);
$vendorDir = trim(`composer config vendor-dir`);
var_dump($home, disk_free_space($home));
var_dump($vendorDir, disk_free_space($vendorDir));不要忘记确保启用了完整的错误报告。
https://stackoverflow.com/questions/50762001
复制相似问题