Skip to content

Disable performance optimization for tests requiring on Xdebug#6353

Merged
sebastianbergmann merged 3 commits intosebastianbergmann:11.5from
staabm:xdebug-optoff
Sep 11, 2025
Merged

Disable performance optimization for tests requiring on Xdebug#6353
sebastianbergmann merged 3 commits intosebastianbergmann:11.5from
staabm:xdebug-optoff

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Sep 6, 2025

closes #6105

@staabm staabm marked this pull request as ready for review September 6, 2025 08:51
@sebastianbergmann sebastianbergmann merged commit a37a378 into sebastianbergmann:11.5 Sep 11, 2025
31 checks passed
@staabm staabm deleted the xdebug-optoff branch September 11, 2025 08:17
@sebastianbergmann
Copy link
Copy Markdown
Owner

sebastianbergmann commented Sep 11, 2025

@staabm There is a failing test when Xdebug is loaded:

1) /Users/sb/Work/OpenSource/phpunit/tests/end-to-end/regression/6105.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 Runtime:       PHP 8.4.12
 Configuration: /Users/sb/Work/OpenSource/phpunit/phpunit.xml

-..                                                                  2 / 2 (100%)
+.F                                                                  2 / 2 (100%)

 Time: 00:00.048, Memory: 10.00 MB

-OK (2 tests, 3 assertions)
+There was 1 failure:
+
+1) IssueTest6105\IssueTest6105::test_case_2_check
+Failed asserting that two arrays are identical.
+--- Expected
++++ Actual
+@@ @@
+-Array &0 [
+-    0 => 'X-Test: Testing',
+-]
++Array &0 []
+
+/Users/sb/Work/OpenSource/phpunit/src/Framework/Constraint/Constraint.php:105
+/Users/sb/Work/OpenSource/phpunit/src/Framework/Constraint/IsIdentical.php:78
+/Users/sb/Work/OpenSource/phpunit/src/Framework/Assert.php:2573
+/Users/sb/Work/OpenSource/phpunit/src/Framework/Assert.php:1660
+/Users/sb/Work/OpenSource/phpunit/tests/end-to-end/regression/6105/IssueTest6105.php:38
+/Users/sb/Work/OpenSource/phpunit/src/Framework/TestCase.php:1657
+/Users/sb/Work/OpenSource/phpunit/src/Framework/TestCase.php:515
+/Users/sb/Work/OpenSource/phpunit/src/Framework/TestRunner/TestRunner.php:87
+/Users/sb/Work/OpenSource/phpunit/src/Framework/TestCase.php:361
+
+FAILURES!
+Tests: 2, Assertions: 3, Failures: 1.

@sebastianbergmann sebastianbergmann changed the title Disable Xdebug perf optimization when test requires xdebug Disable performance optimization for tests requiring on Xdebug Sep 11, 2025
@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Sep 11, 2025

hmm the test was green in CI. where/how did you see it fail?

I guess its related to xdebug.mode settings in php.ini or something

@sebastianbergmann
Copy link
Copy Markdown
Owner

sebastianbergmann commented Sep 11, 2025

The test is not green in CI, it is skipped in CI: https://github.com/sebastianbergmann/phpunit/actions/runs/17639033160/job/50121595814#step:7:50

The test passes locally with XDEBUG_MODE=develop instead of XDEBUG_MODE=off (which is my default).

@staabm staabm mentioned this pull request Sep 11, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants