paratestphp / paratest

:computer: Parallel testing for PHPUnit
MIT License
2.32k stars 229 forks source link

Stop warnings and deprecations failing tests #877

Closed DiogoTheCoder closed 1 month ago

DiogoTheCoder commented 2 months ago

I'm currently trying to upgrade from PHPUnit v9 to v10 and I've got many deprecations which don't fail the PHPUnit tests but are failing when I try to run them under Paratest in a CI pipeline - currently when I run the below it will return with the exit code 1, is there anyway to ignore warnings and deprecations, ignoring them or changing the exit code?

    docker run -t \
        -v $(pwd)/build:/data/www/pam/somic/build \
        -v $(pwd):/data/www/pam/somic/ \
        -v /data/www/pam/somic/vendor/ \
        -e XDEBUG_MODE=coverage \
        --user $(id -u):$(id -g) \
        --network somic-parallel-test-network \
        "${docker_image}" \
        "/data/www/pam/somic/vendor/bin/paratest \
            -p$processes \
            --runner=WrapperRunner \
            --log-junit /data/www/pam/somic/build/junit-phpunit-php-82-pg-14.xml \
            /data/www/pam/somic/tests"
peterfox commented 1 month ago

I am also suffering from this currently. Running it in PHPUnit directly doesn't show the PHPUnit deprecations but Paratest will

Edit: solved my problem. It works with https://github.com/paratestphp/paratest/pull/894. The only problem is that the version the patch exists in only works with PHPUnit 11 so the only way to resolve it is with a local patch for PHPUnit 10 users.