1

this is the relevant composer.jpon config.

"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"
},

When i execute php phpunit the following appears:

Time: 1.01 seconds, Memory: 20.00MB

There was 1 error:

1) UserBundle\Tests\Unit\ScaleUserServiceTest::testIsUsersEmpty Error: Class 'PHPUnit_Util_ErrorHandler' not found

Can someone help me what to do?

Thanks in advance, Max

1 Answer 1

1

You are installing PHPUnit 6. That version does not have PHPUnit_Util_ErrorHandler anymore.

Information on migrating to PHPUnit 6 can be found here, the complete list of changes in PHPUnit 6 is available here.

Sign up to request clarification or add additional context in comments.

4 Comments

I expected that my problem came from an "too-new" package, but could not find out which it was. Thanks Sebastian. Now i have changed under require: phpunit/phpunit to ^5.0 and under require-dev phpunit/dbunit to ^2.0 But now i have another problem, since my test base on PHPUnit\DbUnit\TestCase What do you recomment for me now?
Or is there another, better way, to make my tests work? Maybe even with PHPUnit6?
My Stacktrace shows me, that the error comes from the line that contains: file_get_contents('testfile.txt'); Nothing more
i think i got my system workling by updating symfony/phpunit-bridge to 3.2.4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.