Skip to content

On PHPUnit 6-9, configure stderr separately#788

Merged
localheinz merged 1 commit intoergebnis:mainfrom
tstarling:report-stderr
Mar 13, 2026
Merged

On PHPUnit 6-9, configure stderr separately#788
localheinz merged 1 commit intoergebnis:mainfrom
tstarling:report-stderr

Conversation

@tstarling
Copy link
Contributor

Since there's no way to detect where PHPUnit's output is going prior to PHPUnit 10, configure the extension output separately.

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.90%. Comparing base (008b153) to head (d51a195).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/Extension.php 0.00% 26 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #788      +/-   ##
============================================
- Coverage     71.92%   69.90%   -2.03%     
  Complexity      172      172              
============================================
  Files            34       34              
  Lines           830      854      +24     
============================================
  Hits            597      597              
- Misses          233      257      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@localheinz localheinz force-pushed the report-stderr branch 5 times, most recently from 2d3c9ef to 683940a Compare March 13, 2026 07:43
Since there's no way to detect where PHPUnit's output is going prior to
PHPUnit 10, configure the extension output separately.
@localheinz localheinz merged commit 7431f79 into ergebnis:main Mar 13, 2026
173 of 174 checks passed
@localheinz
Copy link
Member

Thank you, @tstarling!

@localheinz
Copy link
Member

Releasing as ergebnis/phpunit-slow-test-detector:2.24.0 - can you report back and let me know whether this works, and whether we still need the other pull requests related to that, @tstarling?

@reedy
Copy link

reedy commented Mar 26, 2026

Releasing as ergebnis/phpunit-slow-test-detector:2.24.0 - can you report back and let me know whether this works, and whether we still need the other pull requests related to that, @tstarling?

Before:

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/core$ composer phpunit extensions/EmailAuth/tests/phpunit/Integration/SpecialAccountRecoveryTest.php
> Composer\Config::disableProcessTimeout
Using PHP 8.4.18
Generating PHPUnit config
Config already up-to-date.
Using PHP 8.4.18
Running with MediaWiki settings because there might be integration tests
PHPUnit 9.6.34 by Sebastian Bergmann and contributors.

....                                                                4 / 4 (100%)

Time: 00:00.607, Memory: 82.50 MB

OK (4 tests, 18 assertions)


Detected 1 test where the duration exceeded the global maximum duration (0.100).

# Duration Test
-------------------------------------------------------------------------------------------------------------------
1    0.407 MediaWiki\Extension\EmailAuth\Tests\Integration\SpecialAccountRecoveryTest::testSuccessfulFormSubmission
-------------------------------------------------------------------------------------------------------------------
     0.000
      └─── secondsreedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/core$

with https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1261658

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/core$ composer phpunit extensions/EmailAuth/tests/phpunit/Integration/SpecialAccountRecoveryTest.php
> Composer\Config::disableProcessTimeout
Using PHP 8.4.18
Generating PHPUnit config
Config written to /var/www/wiki/mediawiki/core/phpunit.xml
Using PHP 8.4.18
Running with MediaWiki settings because there might be integration tests
PHPUnit 9.6.34 by Sebastian Bergmann and contributors.

....                                                                4 / 4 (100%)

Detected 1 test where the duration exceeded the global maximum duration (0.100).

# Duration Test
-------------------------------------------------------------------------------------------------------------------
1    0.411 MediaWiki\Extension\EmailAuth\Tests\Integration\SpecialAccountRecoveryTest::testSuccessfulFormSubmission
-------------------------------------------------------------------------------------------------------------------
     0.000
      └─── seconds

Time: 00:00.606, Memory: 82.50 MB

OK (4 tests, 18 assertions)

So LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants