php-actions / phpunit

Run PHPUnit tests in Github Actions.
108 stars 24 forks source link

Fails on deprecation notice #39

Closed miiimooo closed 2 years ago

miiimooo commented 2 years ago

I've tested this with different PHP (8.0, 7.4) versions but I keep getting

Error: Process completed with exit code 1.

Run php-actions/phpunit@v3
Run bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/330b13bbb1eadd05bbb627477c154[9](https://github.com/hrwdev/hrw-org/runs/5498578578?check_suite_focus=true#step:4:9)cd7e62e406/php-build.bash) phpunit \ && /home/runner/work/_actions/php-actions/phpunit/v3/phpunit-action.bash || { echo "::group::Debug output" ; cat /home/runner/work/hrw-org/hrw-org/output.log ; echo "::endgroup::" ; exit 1; }
Building PHP 7.4 with extensions:  ...
PHPUnit 9.5.16 by Sebastian Bergmann and contributors.

OK (5 tests, 10 assertions)

Other deprecation notices (1)

  1x: The "PHPUnit\DeepCopy\TypeFilter\Spl\SplDoublyLinkedListFilter" class is considered final. It may change without further notice as of its next major version. You should not extend it from "PHPUnit\DeepCopy\TypeFilter\Spl\SplDoublyLinkedList".
    1x in DrupalListener::endTest from Drupal\Tests\Listeners

I've disabled failOnWarn in my phpunit.xml

miiimooo commented 2 years ago

Removing the DrupalListener helped as a workaround but I would still like to solve the underlying issue. Might be somewhere between Drupal and Symfony trying to catch these

g105b commented 2 years ago

I managed to get a similar issue with a project I'm working on, but disabling failOnWarn fixed the issue for me.

I'm going to close this issue unless you want to continue the conversation then I'm happy to open again.

On a side note, I'm really confused by the recent change in behavior from PHPUnit - throwing an exception instead of a warning changes the flow of my program significantly, so surely this is something that shouldn't be done by default? Anyway... I'm glad we both found a workaround.