错误:Class' PHPUnit_Util_ErrorHandler'未找到

时间:2017-04-06 13:03:30

标签: php symfony phpunit composer-php

这是相关的composer.jpon配置。

"require": {
    "php": ">=5.5.9",
    "twig/twig": "^2.0",
    "symfony/symfony": "3.2.*",
    "doctrine/orm": "^2.5",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/doctrine-cache-bundle": "^1.2",
    "symfony/swiftmailer-bundle": "^2.3",
    "symfony/monolog-bundle": "~2.11.3",
    "symfony/polyfill-apcu": "^1.0",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "incenteev/composer-parameter-handler": "^2.0",
    "friendsofsymfony/user-bundle": "dev-master",
    "knplabs/knp-paginator-bundle": "^2.5",
    "symfony/assetic-bundle": "^2.7",
    "vich/uploader-bundle": "dev-master",
    "twbs/bootstrap": "^3.3",
    "components/jquery": "^2.1",
    "twig/extensions": "^1.3",
    "phpunit/phpunit": "^6.0"
},
"require-dev": {
    "sensio/generator-bundle": "^3.0",
    "doctrine/doctrine-fixtures-bundle": "^2.3",
    "phpunit/dbunit": "^3.0",
    "symfony/phpunit-bridge": "^3.0"
},

当我执行php phpunit时,会出现以下内容:

时间:1.01秒,内存:20.00MB

有1个错误:

1)UserBundle \ Tests \ Unit \ ScaleUserServiceTest :: testIsUsersEmpty 错误:Class' PHPUnit_Util_ErrorHandler'找不到

有人可以帮助我做什么吗?

提前致谢, 最大

1 个答案:

答案 0 :(得分:1)

您正在安装PHPUnit 6.该版本不再有PHPUnit_Util_ErrorHandler

可以找到有关迁移到PHPUnit 6的信息here,PHPUnit 6中的完整变更列表可用here