2018-06-08 13:42
浏览 235


This is my first time using composer. I am trying to build a project that uses it but I cannot get composer to function properly. For the command composer diagnose I get the following every time:

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

All other tests return OK. My disk has 64gb free. I tried searching for this issue but found little help. I upped the memory limit in php to 512mb as a shot in the dark without effect. Some posts related to this suggested it was out of memory but my ram never goes above 35% usage.

I tried running composer clear-cache without any effect.

Trying to run this on php 7.2.6, composer 1.6.5

图片转代码服务由CSDN问答提供 功能建议

这是我第一次使用作曲家。 我正在尝试构建一个使用它的项目,但我无法使作曲家正常运行。 对于命令编辑器诊断我每次都会得到以下内容:

  PS C:\ WinNMP \ WWW \ Oro>  composer diagnose 
许可证“商业”不是有效的SPDX许可证标识符,请参阅https://spdx.org/licenses  /如果您使用开放许可证。
检查https连接 to packagist:OK 
检查github.com oauth访问:确定
磁盘托管C:/ Users / Mark / AppData / Roaming / Composer已满

所有其他测试返回OK。 我的磁盘有64GB免费。 我尝试搜索这个问题,但没有找到帮助。 我将php中的内存限制提高到了512mb,在黑暗中没有效果。 一些与此相关的帖子表明内存不足但我的内存从未超过35%的使用率。

我尝试运行composer clear-cache而没有任何影响。 \ n

尝试在php 7.2.6,composer 1.6.5 上运行它

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dtkp51520
    dtkp51520 2018-06-08 14:22

    The function that triggers this error message is this:

    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;

    You may want to write a little script that makes the same check, except that without error suppression. To get the values for homeand vendor-dir you can run these commands:

    composer config home
    composer config vendor-dir

    A rough idea:

    $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));

    Don't forget to make sure that you have full error reporting enabled.

    点赞 评论