Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit XML logger issue with php8.3 #5606

Closed
asbiin opened this issue Dec 9, 2023 · 3 comments
Closed

JUnit XML logger issue with php8.3 #5606

asbiin opened this issue Dec 9, 2023 · 3 comments
Labels
version/10 Something affects PHPUnit 10

Comments

@asbiin
Copy link

asbiin commented Dec 9, 2023

Q A
PHPUnit version 10.5.2
PHP version 8.3.0
Installation Method Composer

Summary

This is the same bug as #5561, but it appear to fail on php8.3.

Current behavior

See https://github.com/monicahq/monica/actions/runs/7152664272/job/19478241958?pr=6892

An error occurred inside PHPUnit.

Message:  PHPUnit\Event\Telemetry\HRTime::duration(): Argument #1 ($start) must be of type PHPUnit\Event\Telemetry\HRTime, null given, called in /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php on line 264
Location: /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php:62

#0 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php(264): PHPUnit\Event\Telemetry\HRTime->duration()
#1 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php(213): PHPUnit\Logging\JUnit\JunitXmlLogger->handleFinish()
#2 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php(28): PHPUnit\Logging\JUnit\JunitXmlLogger->testFinished()
#3 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php(100): PHPUnit\Logging\JUnit\TestFinishedSubscriber->notify()
#4 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Event/Dispatcher/DeferringDispatcher.php(45): PHPUnit\Event\DirectDispatcher->dispatch()
#5 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php(954): PHPUnit\Event\DeferringDispatcher->dispatch()
#6 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php(272): PHPUnit\Event\DispatchingEmitter->testFinished()
#7 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php(150): PHPUnit\Util\PHP\AbstractPhpProcess->processChildResult()
#8 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Framework/TestRunner.php(347): PHPUnit\Util\PHP\AbstractPhpProcess->runTestJob()
#9 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Framework/TestCase.php(491): PHPUnit\Framework\TestRunner->runInSeparateProcess()
#10 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Framework/TestSuite.php(340): PHPUnit\Framework\TestCase->run()
#11 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Framework/TestSuite.php(340): PHPUnit\Framework\TestSuite->run()
#12 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/Framework/TestSuite.php(340): PHPUnit\Framework\TestSuite->run()
#13 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(63): PHPUnit\Framework\TestSuite->run()
#14 /home/runner/work/monica/monica/vendor/phpunit/phpunit/src/TextUI/Application.php(189): PHPUnit\TextUI\TestRunner->run()
#15 /home/runner/work/monica/monica/vendor/phpunit/phpunit/phpunit(99): PHPUnit\TextUI\Application->run()
#16 /home/runner/work/monica/monica/vendor/bin/phpunit(122): include('...')
#17 {main}

How to reproduce

Expected behavior

There is no issue on php 8.2

@asbiin asbiin added type/change-in-php-requires-adaptation A change in PHP requires a change so that existing PHPUnit functionality continues to work version/10 Something affects PHPUnit 10 labels Dec 9, 2023
@sebastianbergmann sebastianbergmann added status/waiting-for-feedback Waiting for feedback from original reporter and removed type/change-in-php-requires-adaptation A change in PHP requires a change so that existing PHPUnit functionality continues to work labels Dec 10, 2023
@sebastianbergmann
Copy link
Owner

Thank you for your report.

Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.

Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.

@asbiin
Copy link
Author

asbiin commented Dec 10, 2023

Helllo @sebastianbergmann Thank you for your answer. Unfortunately, I don't really know how to reproduce it. Just saw that phpunit ci is already testing php 8.3, so this might not be related to this php version ...

@sebastianbergmann
Copy link
Owner

If you cannot reproduce it then I cannot investigate it, sorry.

@sebastianbergmann sebastianbergmann closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2023
@sebastianbergmann sebastianbergmann removed the status/waiting-for-feedback Waiting for feedback from original reporter label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version/10 Something affects PHPUnit 10
Projects
None yet
Development

No branches or pull requests

2 participants