无法运行通过composer安装的phploc

时间:2012-11-22 16:14:48

标签: php jenkins composer-php

这是我的composer.json文件。它安装成功:

{
    "name": "lorem-ipsum",
    "description": "Lorem Ipsum",
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.4",
        "zendframework/zendframework": "2.0.4",
        "doctrine/doctrine-module": "0.5.2",
        "doctrine/doctrine-orm-module": "0.5.3",
        "gedmo/doctrine-extensions": "2.3.1"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.9",
        "squizlabs/php_codesniffer": "1.4.2",
        "phpmd/phpmd": "1.4.0",
        "phploc/phploc": "1.7.4"
    }
}

但是当我跑的时候:

./vendor/bin/phploc

我收到错误:

PHP Fatal error:  Class 'PHPLOC_TextUI_Command' not found in /home/richard/projects/lorem-ipsum/workspace/vendor/phploc/phploc/composer/bin/phploc on line 70

我认为存在一些自动加载问题。怎么解决?

1 个答案:

答案 0 :(得分:1)

this commit a few weeks ago发布后不久就修复了这个问题 - 我建议您在下一个版本发布之前使用dev-master而不是1.7.4。