Repository navigation
Update dependency phpunit/phpunit to v13 - #85
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
May 27, 2026 14:08
04559b0 to
6493ad5
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
June 4, 2026 08:38
6493ad5 to
9805044
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
June 16, 2026 00:43
9805044 to
3918dc9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.0 #85 +/- ##
=========================================
Coverage 77.90% 77.90%
Complexity 17 17
=========================================
Files 9 9
Lines 86 86
=========================================
Hits 67 67
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
June 30, 2026 17:12
3918dc9 to
f52d302
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
2 times, most recently
from
July 25, 2026 09:59
f7b6f00 to
6ea2959
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
August 4, 2026 17:12
6ea2959 to
6824809
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
September 7, 2026 20:28
6824809 to
ae0bfa9
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
September 15, 2026 09:11
ae0bfa9 to
fada75c
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
2 times, most recently
from
October 1, 2026 04:53
6ddbb26 to
1b8adad
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
November 19, 2026 20:11
1b8adad to
c5bcc97
Compare
renovate
Bot
force-pushed
the
renovate/phpunit-phpunit-13.x
branch
from
December 4, 2026 15:00
c5bcc97 to
7476510
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
^12.5.23→^13.0.0Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v13.5.1: PHPUnit 13.5.1Compare Source
Changed
Test\BeforeFirstTestMethodCalled,Test\BeforeTestMethodCalled,Test\PreConditionCalled,Test\PostConditionCalled,Test\AfterTestMethodCalled, andTest\AfterLastTestMethodCalledevents are now emitted before the hook method is invoked, not after it has returned: events that are emitted while a hook method is running, for instance for an issue that it triggers, now follow the event for that hook methodFixed
@operator, or that are ignored by the baseline, are reported, and can make the test runner exit with a shell exit code that indicates failure, when they are triggered outside of tests, for instance when a test file is loadedAn error occurred inside PHPUnit.) when the socket that is configured as the target of--log-json,--log-junit,--log-teamcity,--testdox-html, or--testdox-text(or of their counterparts in the XML configuration file) cannot be opened: a test runner warning is now triggered and the logfile is not written--allis used and a default test suite is configured using thedefaultTestSuiteattribute in the XML configuration file, the bootstrap scripts that are configured for the other test suites are not loaded although the tests of these test suites are runphpunit.xsd) states0as the default value of thedefaultTimeLimitattribute although the default value is1--timeout) was exceeded: these test suites are now reported as aborted, together with the reason why the test run was stopped--timeout) was exceeded, is not separated from the output that follows it when no test was run--warm-coverage-cachealways caches the result of the static analysis that determines the executable lines of a file from its syntax, also when a test run with the same configuration determines them from the bytecode of the file: the first test run then performs and caches the static analysis againphpunit.xsd) statesvar(--bs-gray-200)andvar(--bs-gray-800)as the default values of thecolorBreadcrumbsandcolorBreadcrumbsDarkattributes although the default values are#eef1f5and#​22272ephaseof the observation in the result of the test run in JSON format is wrong or missing when the PHP process ends while a before-test method, a pre-condition method, a post-condition method, or an after-test method is runningphaseof the observation in the result of the test run in JSON format ispost-conditioninstead oftestwhen an expectation for the output of a test is not met and the test class has a post-condition methodLearn how to install or update PHPUnit 13.5 in the documentation.
Keep up to date with PHPUnit:
v13.5.0: PHPUnit 13.5.0Compare Source
Added
--show-effective-configurationCLI option to show what a configuration will execute, without executing itTestCase::suspendOutputBuffering()andTestCase::resumeOutputBuffering()methods for capturing the output of a test method thatTestCase::invokeTestMethod()runs in a coroutine with its own output buffers--random-seed <N>CLI option--triggering-tests-limitCLI option andtriggeringTestsLimitXML attribute to group and limit the tests listed for each issue--json,--log-json)nandpkeys, and two buttons, jump to the next and to the previous one--gaps-onlyCLI option andgapsOnlyattribute for the<jsonl>element of the XML configuration file to limit the code coverage report in JSONL format to what is not covered:coverage.jsonlthen has no record for a file that has nothing that is not covered, and no record for a method or function that is covered--details-limit <n>CLI option to limit each message, each stack trace, and the output of each test that the compact output (--compact) prints, and each message, diff, and stack trace of the result of the test run in JSON format that is the output of--json, to<n>charactersexitCode()andsignal()methods on theTestRunner\ChildProcessFinishedandTestRunner\ChildProcessErroredevents for the exit code of a child process and the signal that terminated itoutcome()method on theApplication\Finishedevent for how the test run ended, as the run receipt records it: its status, the numbers of tests by outcome, and the numbers of the issues triggered by tests and by the test runnerChanged
phpunit:randomOrderSeedtophpunit:randomSeedin Open Test Reporting XML logfiles--random-seed <N>, regardless of whether PHPUnit needs random number generation&&(orand) that spans multiple lines is no longer reported as covered when it was not executed, as this operand is not evaluated when the left operand is false||(oror) that spans multiple lines, and the lines of a method call or property fetch after?->that starts on a line of its own, are no longer reported as covered when they were not executedopcache.optimization_level=0), and does not skip recently modified files (opcache.file_update_protection=0): lines that PHP attributes no code to, such as the continuation lines of a multi-line function call, are then no longer counted as executable--compact) are now indented by two spaces: a message, a diff, a stack trace, and the output of a test can no longer be mistaken for the header of a record, the summary line, or the receipt of the test run, which begin in the first column--compact) now prints the path of a file inside the working directory relative to the working directory, which the receipt of the test run names, in the frames of a stack trace, in the header of the record for an issue, and in the location of a test that triggered an issue: the path to the project is no longer repeated in each of them, and a file outside the working directory stands out--compact) no longer begins withOKwhen no test failed or errored but the test run was cut short: it begins withSTOPPEDwhen a--stop-on-*option ended the test run, withINTERRUPTEDwhen a signal did, and withTIME LIMIT EXCEEDEDwhen the time limit configured using--timeoutwas exceeded--compact) now prints that the test run was interrupted by a signal as a record of its own, after the summary lineOKwhen no test failed or errored but the test run was cut short: it saysSTOPPED!when a--stop-on-*option ended the test run,INTERRUPTED!when a signal did, andTIME LIMIT EXCEEDED!when the time limit configured using--timeoutwas exceeded, followed by the numbers of tests and assertions--stop-on-*option stopped the test run, in a line of its own before the result is printed, for instanceThe test run was stopped by --stop-on-failure.: a test run that was stopped after a test failed or errored was reported exactly like a test run that ran every selected test--timeoutis no longer started when the time limit cannot be enforced because the pcntl extension is not available: the test runner then exits with an error message and shell exit code2, instead of only checking the time limit between two tests--cache-directoryor thecacheDirectoryattribute cannot be created or cannot be written to: the test runner then exits with an error message that names the directory and with shell exit code2, before the bootstrap script, the extensions, or the tests are loaded. This does not depend on whether the test run would write to the cache directory, and it also applies to--warm-coverage-cache. Until now, such a test run recorded its history elsewhere, or not at all, without saying so, or crashed when code coverage was collected--cache-directorythat cannot be created is no longer replaced, without saying so, by the cache directory that is configured in the XML configuration fileexit(), or because PHP raises an error that ends the process while a code coverage report is written, is now reported as a premature end, as it already is when a test is running: a message such asFatal error: Premature end of PHP process while the bootstrap script was loaded.is printed and the shell exit code is2, also whenexit(0)was called--compact) and the result of the test run in JSON format (--json,--log-json) now record a test run that did not reach its end because the PHP process ended while a bootstrap script, an extension, or the test suite was loaded, while tests were executed, or while the result of the test run was reported: the receipt and the JSON document are written with the statusended-prematurely--log-otr) of a test run that did not reach its end, because the PHP process ended although the test runner did not end it, because the test runner crashed, or because a second interrupt signal (SIGINT) ended the test run at once, is now a complete document: the test and the test suites that were not finished are reported as aborted, and thephpunit:outcomeelement is written with the statusended-prematurely,crashed, orinterruptedand says why the test run did not reach its end in itsphpunit:reasonelement--compact) and the result of the test run in JSON format (--json,--log-json) now record a test run during which the test runner crashed, with the statuscrashed, and a test run that a second interrupt signal (SIGINT) ended at once, with the statusinterrupted--compact) now records a test run that is not started, for instance because the cache directory cannot be written to, because the bootstrap script or a test file cannot be loaded, or because the time limit configured using--timeoutcannot be enforced: the reason is printed as aNOT STARTEDrecord, followed by the receipt of the test run with the statusnot-startedand the shell exit code, instead of as a line of text without a receipt--log-otr) of a test run that is not started, for instance because the cache directory cannot be written to or because the bootstrap script or a test file cannot be loaded, is now a complete document: thephpunit:outcomeelement is written with the statusnot-startedand says why the test run was not started in itsphpunit:reasonelement, instead of the logfile ending after the event that starts the test run, without its root element being closedApplication\Finishedevent is now also emitted for a test run that is not started after the extensions were loaded, for instance because a test file cannot be loaded or because the file configured using--test-id-filter-filedoes not exist: the outcome that the event carries then has the statusnot-started. A subscriber that does something when the test run has ended, for instance writing a report, is now also notified in these casesSIGINT) now ends with shell exit code130, no matter whether the tests that were run until then passed, instead of the shell exit code of a test run that ran every selected test--timeoutis exceeded while they are running: the child process is terminated and the test is reported as an error, instead of the test run being stopped only after such a test has finishedSKIPIFsection of a PHPT test that is not run in a separate process are now aborted, as a test already is, when they are running in the test runner's process when the time limit for the test run configured using--timeoutis exceeded (this requires thepcntlextension)124, when no test is started or finished after the time limit was exceeded, for instance because it was exceeded by an after-last-test method--enforce-time-limit) is now aborted when the time limit for the test run is exceeded before the time limit for the test--timeoutwas exceeded, for instance because a test catches the exception it is aborted with or because the bootstrap script does not end, is now stopped: the test that was running is reported as an error, the result is printed, and the test runner exits with shell exit code124(this requires thepcntlextension)--timeoutwas exceeded, for instance one that a test started usingexec()and waits for, is now terminated one second after the time limit was exceeded, and the test runner itself is terminated when it has not ended the test run five seconds after the time limit was exceeded, for instance because thepcntlextension is not available and a test does not end (this requires theposixextension and is not available on Windows)setUpBeforeClass(), of a test class whose tests all run in separate processes callsmarkTestSkipped()ormarkTestIncomplete(), fails, or errors, then a separate process is now started for each test of the class and each test is reported as skipped, failed, or errored, instead of the test class being reported once as skipped, failed, or errored#[RequiresPhp],#[RequiresPhpExtension], and#[RequiresPhpunit]are handled using sebastian/version-requirement: a test errors when its version requirement is neither a version constraint such as^8.5nor a version comparison such as>= 8.5.0, for instance8.5.0RC1,8.5-dev, or>=8.3 <8.5, which were previously interpreted as>= 8.5.0RC1,8.5.*, and< 8.5, respectivelyDeprecated
--random-order-seed <N>CLI optionmarkTestSkipped()ormarkTestIncomplete()in an after-test method, for instancetearDown(), or in an after-last-test method, for instancetearDownAfterClass()extensionsDirectoryXML configuration attributeFixed
assertFinite()does not tell PHPStan that the value is a finitefloator anint, so the type of the value is not narrowed when test code is analysed with PHPStan (this requires PHPStan 2.3.6 or newer)--ENV--section is started with an environment that is built from$_SERVERinstead of the environment of the test runner's process: environment variables that were set usingputenv(), for instance those configured using<env>in the XML configuration file, are missing, and elements of$_SERVERthat are not environment variables, for instance those configured using<server>in the XML configuration file, are exported as environment variablesfopen(): Failed to open stream: Permission denied) instead of a test runner warningAn error occurred inside PHPUnit.) when code coverage is collected and the directory in which the result of the static analysis is cached cannot be created: a test runner warning is now triggered and the result of the static analysis is not cached, and--warm-coverage-cachereports the directory it cannot useLearn how to install or update PHPUnit 13.5 in the documentation.
Keep up to date with PHPUnit:
v13.4.8: PHPUnit 13.4.8Compare Source
Fixed
--generate-baselinecontains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of oncebuild/baseline.xmland the file insrc--log-junit php://stdoutis used, orphp://stdoutis configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends withAn error occurred inside PHPUnitafter the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is255--log-junit php://stdoutis used together with--stderr, the JUnit XML is printed to the standard error stream--compactonly printsNo tests executed!and not why, for instance the PHPUnit error for the invalid data provider of the only test, or the test runner warning for a test class without testsLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.7: PHPUnit 13.4.7Compare Source
Fixed
--order-by random,defectsconfigured using theexecutionOrderattribute in the XML configuration file is still applied, and vice versadefaulttogether with an order for--order-byor theexecutionOrderXML configuration attribute, for instancedefault,random, triggers a deprecation for using more than one order, althoughdefaultresets the order instead of selecting one--fail-on-skippeddoes not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped(), although its tests are counted as skipped--stop-on-skippeddoes not stop the test run when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped()PHPUnit\orSebastianBergmann\namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not availablesebastian/file-filterandsebastian/git-stateis not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack tracesnikic/php-parserand parts of the code fromphar-io/manifestare not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack tracesLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.6: PHPUnit 13.4.6Compare Source
Changed
Fixed
method()is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails withMethod name is not configuredsetUp(), marks the test as incomplete, the hook method is reported as failedtearDown(), marks a successful test as incomplete or skips it, the test is reported as failedsetUpBeforeClass(), callsmarkTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is whenmarkTestSkipped()is calledtearDownAfterClass(), callsmarkTestIncomplete()ormarkTestSkipped()after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolationassert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test methodtearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once andonNotSuccessfulTest()is called with the failure from the "after test" method instead of the test's owntearDown(), is reported in addition to the test's failure, so the test is counted more than oncerequireCoverageMetadata="true"is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failedsetUpBeforeClass()--debugand in the logfiles written by--log-events-textand--log-events-verbose-textgroupsattribute of<directory>or<file>in the XML configuration file are not assigned to PHPT tests, so--groupand--exclude-groupdo not select them and--list-groupsand--list-tests-xmlreport them as being in thedefaultgroup or not at allRemoved
phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8Learn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.5: PHPUnit 13.4.5Compare Source
Fixed
Learn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.4: PHPUnit 13.4.4Compare Source
Fixed
testSuiteFinishedtwice for a test class when one of its before-first-test methods errors or failstearDown()of a test that erroredLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.3: PHPUnit 13.4.3Compare Source
Fixed
CodeCoverageorFacade#[Before]method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errorsEfor the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an errorrequirements is not met
setUp(), and reports the test that is run after it as aborted with the message of the incomplete testsetUp()raises an exception or the global state cannot be backed uptearDown()fails after the test errored, with its last outcome instead of its most severe one, and with more than one end when the preparation of the test errored]]>, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSIescape sequence
setUp(), with an empty ID before the start of the testLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.2: PHPUnit 13.4.2Compare Source
Fixed
expectUserDeprecationMessage()andexpectUserDeprecationMessageMatches()did not see the deprecations triggered by an attempt of a retried test and saw those of the previously run test instead#[Retry]does not retry the test,--repeatdoes not skip the remaining repetitions,tearDown()sees the wrong status, and code coverage records the test as successfulwith()were matched by position instead of by name, so an expectation such as->with(b: 7)compared the expected value with the first parameter of the method and the parameter named$bwas not checkedwithParameterSetsInOrder(),withParameterSetsInAnyOrder(), andwithParameterSetsInPartialOrder()were ignored, so a parameter set such as['b' => 7]compared the expected value with the first parameter of the method and the parameternamed
$bwas not checkedLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.1: PHPUnit 13.4.1Compare Source
Changed
Fixed
TestSuite::runTests()doubles garbage collector time whenzend.exception_ignore_argsis offsetUpBeforeClass()andtearDownAfterClass()were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class--ARGS--section of a PHPT test that start with-were interpreted by PHP instead of being passed to the test when the test also has a--STDIN--sectionLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.0: PHPUnit 13.4.0Compare Source
Added
executionOrderattribute values and--order-bytoken lists that spell the order beforedefects, for exampleduration-ascending,defectspipeline()on theTestSuite\Sortedevent for inspecting which reordering stages were appliedConstraint::negatedToString()andConstraint::negatedFailureDescription()for authoring the description of a constraint that is wrapped inLogicalNot#[RequiresClass]attribute to skip a test if a class does not existChildProcessExtensioninterface for extensions that need to be bootstrapped in the child process of a test that runs in process isolation--coverage-jsonlCLI option and<jsonl>element for the XML configuration file to write a code coverage report in JSONL format, one JSON object per line, that reports uncovered code rather than every executable line--timeoutCLI option to limit the wall-clock time of the entire test runrequireCoverageMetadataOnSmallTests,requireCoverageMetadataOnMediumTests, andrequireCoverageMetadataOnLargeTestsattributes for the XML configuration file to require code coverage metadata depending on the size of a test; these have precedence overrequireCoverageMetadataChanged
--- OUTPUT:record that is attributed to the test instead of being passed through unformatted; the record is omitted whenbeStrictAboutOutputDuringTestsor--disallow-test-outputalready reports the output as riskyDeprecated
defectsbefore the order for--order-byandexecutionOrder, which will change meaning in PHPUnit 14dependsandno-dependsfor--order-byandexecutionOrder--order-byandexecutionOrderexecutionOrderXML configuration attribute, which are currently ignoredConstraint::failureDescriptionInContext()andLogicalNot::negate()#[Group],#[Ticket],#[Small],#[Medium], and#[Large]on parent classes of test classesFixed
#[DataProviderClosure]errors when it is run in process isolationLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.3.6: PHPUnit 13.3.6Compare Source
Fixed
#[RequiresMethod]is declared asclass-string, so static analysis reports an error when it refers to a class that does not exist#[RequiresMethod]attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the testLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.5: PHPUnit 13.3.5Compare Source
Changed
\u{NNNN}escape sequences instead of being passed through to the terminalLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.4: PHPUnit 13.3.4Compare Source
Fixed
SourceMappermay be deleted prematurely--display-phpunit-deprecationsand--display-phpunit-noticesare not usedLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.3: PHPUnit 13.3.3Compare Source
Fixed
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.