Skip to content

Update dependency phpunit/phpunit to v13 - #85

Open
renovate[bot] wants to merge 1 commit into
1.0from
renovate/phpunit-phpunit-13.x
Open

renovate[bot] wants to merge 1 commit into
1.0from
renovate/phpunit-phpunit-13.x

Conversation

@renovate

@renovate renovate Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
phpunit/phpunit (source) ^12.5.23 → ^13.0.0 age confidence

Release Notes

sebastianbergmann/phpunit (phpunit/phpunit)

v13.5.1: PHPUnit 13.5.1

Compare Source

Changed
  • The Test\BeforeFirstTestMethodCalled, Test\BeforeTestMethodCalled, Test\PreConditionCalled, Test\PostConditionCalled, Test\AfterTestMethodCalled, and Test\AfterLastTestMethodCalled events 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 method
Fixed
  • Deprecations, notices, and warnings that are suppressed using the @ 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 loaded
  • The test runner crashes (An 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
  • When --all is used and a default test suite is configured using the defaultTestSuite attribute 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 run
  • The schema for the XML configuration file (phpunit.xsd) states 0 as the default value of the defaultTimeLimit attribute although the default value is 1
  • The logfile in Open Test Reporting XML format does not finish the test suites that were running when a test run is stopped because it did not end after its time limit (--timeout) was exceeded: these test suites are now reported as aborted, together with the reason why the test run was stopped
  • The message that a test run was interrupted by a signal, or that its time limit (--timeout) was exceeded, is not separated from the output that follows it when no test was run
  • --warm-coverage-cache always 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 again
  • The schema for the XML configuration file (phpunit.xsd) states var(--bs-gray-200) and var(--bs-gray-800) as the default values of the colorBreadcrumbs and colorBreadcrumbsDark attributes although the default values are #eef1f5 and #​22272e
  • The phase of 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 running
  • The phase of the observation in the result of the test run in JSON format is post-condition instead of test when an expectation for the output of a test is not met and the test class has a post-condition method

Learn how to install or update PHPUnit 13.5 in the documentation.

Keep up to date with PHPUnit:

v13.5.0: PHPUnit 13.5.0

Compare Source

Added
  • #​7038: --show-effective-configuration CLI option to show what a configuration will execute, without executing it
  • #​7039: TestCase::suspendOutputBuffering() and TestCase::resumeOutputBuffering() methods for capturing the output of a test method that TestCase::invokeTestMethod() runs in a coroutine with its own output buffers
  • #​7049: --random-seed <N> CLI option
  • #​7086: --triggering-tests-limit CLI option and triggeringTestsLimit XML attribute to group and limit the tests listed for each issue
  • #​7146: Run receipt that records what was run and how the run ended in Open Test Reporting logfile and the compact output
  • #​7198: Result of the test run in JSON format (--json, --log-json)
  • phpunit/php-code-coverage #​1056: The code coverage report in XML format includes branch and path coverage
  • phpunit/php-code-coverage 14.6: The code coverage report in HTML format shows, next to a line that is covered, how many tests cover it or, when the code coverage driver collects hit counts, how often the line was executed
  • phpunit/php-code-coverage 14.6: The code coverage report in HTML format has navigation between the pieces of code that are not covered: the n and p keys, and two buttons, jump to the next and to the previous one
  • --gaps-only CLI option and gapsOnly attribute for the <jsonl> element of the XML configuration file to limit the code coverage report in JSONL format to what is not covered: coverage.jsonl then 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> characters
  • exitCode() and signal() methods on the TestRunner\ChildProcessFinished and TestRunner\ChildProcessErrored events for the exit code of a child process and the signal that terminated it
  • outcome() method on the Application\Finished event 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 runner
Changed
  • #​7049: Renamed phpunit:randomOrderSeed to phpunit:randomSeed in Open Test Reporting XML logfiles
  • #​7051: Seed random number generators using --random-seed <N>, regardless of whether PHPUnit needs random number generation
  • phpunit/php-code-coverage #​1407: The line of the right operand of a && (or and) 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
  • phpunit/php-code-coverage 14.6: The line of the right operand of a || (or or) 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 executed
  • phpunit/php-code-coverage 14.6: On PHP 8.6 and later, the executable lines of a file are determined from its bytecode instead of from its syntax when OPcache is enabled, compiles the code without optimizations (opcache.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
  • phpunit/php-code-coverage 14.6: Processing the code coverage data of a test, and merging the code coverage data of tests that are run in separate processes, is faster
  • phpunit/php-code-coverage 14.6: The code coverage report in HTML format lists a directory that contains nothing but another directory, or nothing but a single file, together with what it contains instead of requiring a click for each level
  • phpunit/php-code-coverage 14.6: The view for branch coverage of the code coverage report in HTML format shows, next to a line that a branch with more than one successor ends on, which of the edges out of that branch were taken
  • The lines below the header of a record of the compact output (--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
  • The compact output (--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
  • The summary line of the compact output (--compact) no longer begins with OK when no test failed or errored but the test run was cut short: it begins with STOPPED when a --stop-on-* option ended the test run, with INTERRUPTED when a signal did, and with TIME LIMIT EXCEEDED when the time limit configured using --timeout was exceeded
  • The compact output (--compact) now prints that the test run was interrupted by a signal as a record of its own, after the summary line
  • The summary of the default output no longer says OK when no test failed or errored but the test run was cut short: it says STOPPED! when a --stop-on-* option ended the test run, INTERRUPTED! when a signal did, and TIME LIMIT EXCEEDED! when the time limit configured using --timeout was exceeded, followed by the numbers of tests and assertions
  • The default output now says which --stop-on-* option stopped the test run, in a line of its own before the result is printed, for instance The 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
  • A test run for which a time limit is configured using --timeout is 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 code 2, instead of only checking the time limit between two tests
  • A test run is no longer started when the cache directory that is configured using --cache-directory or the cacheDirectory attribute 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 code 2, 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
  • A cache directory configured using --cache-directory that cannot be created is no longer replaced, without saying so, by the cache directory that is configured in the XML configuration file
  • A PHP process that ends before the test run did and while no test is running, for instance because a bootstrap script, an extension, a data provider, or a before-first-test method calls exit(), 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 as Fatal error: Premature end of PHP process while the bootstrap script was loaded. is printed and the shell exit code is 2, also when exit(0) was called
  • The compact output (--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 status ended-prematurely
  • The Open Test Reporting XML logfile (--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 the phpunit:outcome element is written with the status ended-prematurely, crashed, or interrupted and says why the test run did not reach its end in its phpunit:reason element
  • The compact output (--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 status crashed, and a test run that a second interrupt signal (SIGINT) ended at once, with the status interrupted
  • The compact output (--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 --timeout cannot be enforced: the reason is printed as a NOT STARTED record, followed by the receipt of the test run with the status not-started and the shell exit code, instead of as a line of text without a receipt
  • The Open Test Reporting XML logfile (--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: the phpunit:outcome element is written with the status not-started and says why the test run was not started in its phpunit:reason element, instead of the logfile ending after the event that starts the test run, without its root element being closed
  • The Application\Finished event 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-file does not exist: the outcome that the event carries then has the status not-started. A subscriber that does something when the test run has ended, for instance writing a report, is now also notified in these cases
  • A test run that was interrupted by a signal (SIGINT) now ends with shell exit code 130, 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
  • Before-first-test and after-last-test methods of a test class whose tests all run in separate processes are no longer called in the test runner's process
  • A test that is run in a separate process and a PHPT test are now aborted when the time limit for the test run configured using --timeout is 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 finished
  • A before-first-test method, an after-last-test method, a data provider, and a SKIPIF section 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 --timeout is exceeded (this requires the pcntl extension)
  • An exceeded time limit for the test run is now also noticed, and reported using shell exit code 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
  • A test with a time limit of its own (--enforce-time-limit) is now aborted when the time limit for the test run is exceeded before the time limit for the test
  • A test run whose tests have not ended two seconds after the time limit for the test run configured using --timeout was 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 code 124 (this requires the pcntl extension)
  • A process that keeps the test runner from noticing that the time limit for the test run configured using --timeout was exceeded, for instance one that a test started using exec() 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 the pcntl extension is not available and a test does not end (this requires the posix extension and is not available on Windows)
  • When a before-first-test method, for instance setUpBeforeClass(), of a test class whose tests all run in separate processes calls markTestSkipped() or markTestIncomplete(), 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
  • Version requirements of #[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.5 nor a version comparison such as >= 8.5.0, for instance 8.5.0RC1, 8.5-dev, or >=8.3 <8.5, which were previously interpreted as >= 8.5.0RC1, 8.5.*, and < 8.5, respectively
Deprecated
  • #​7049: --random-order-seed <N> CLI option
  • Calling markTestSkipped() or markTestIncomplete() in an after-test method, for instance tearDown(), or in an after-last-test method, for instance tearDownAfterClass()
  • Support for loading test runner extensions from PHARs using the extensionsDirectory XML configuration attribute
Fixed
  • assertFinite() does not tell PHPStan that the value is a finite float or an int, so the type of the value is not narrowed when test code is analysed with PHPStan (this requires PHPStan 2.3.6 or newer)
  • The process that runs a PHPT test with an --ENV-- section is started with an environment that is built from $_SERVER instead of the environment of the test runner's process: environment variables that were set using putenv(), for instance those configured using <env> in the XML configuration file, are missing, and elements of $_SERVER that are not environment variables, for instance those configured using <server> in the XML configuration file, are exported as environment variables
  • A test run history that cannot be written, for instance because the directory of the XML configuration file is read-only and no cache directory is configured, leads to a PHP warning that is printed as it is (fopen(): Failed to open stream: Permission denied) instead of a test runner warning
  • The test runner crashes (An 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-cache reports the directory it cannot use

Learn how to install or update PHPUnit 13.5 in the documentation.

Keep up to date with PHPUnit:

v13.4.8: PHPUnit 13.4.8

Compare Source

Fixed
  • The baseline generated using --generate-baseline contains 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 once
  • A baseline is not applied to the issues that are triggered in a file that is not located in the directory of the baseline, or in a directory below it, for instance when the baseline is located in build/baseline.xml and the file in src
  • When --log-junit php://stdout is used, or php://stdout is configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends with An error occurred inside PHPUnit after 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 is 255
  • When --log-junit php://stdout is used together with --stderr, the JUnit XML is printed to the standard error stream
  • When no test is run, --compact only prints No 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 tests

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.7: PHPUnit 13.4.7

Compare Source

Fixed
  • When an order is configured on the command line, for instance using --order-by random, defects configured using the executionOrder attribute in the XML configuration file is still applied, and vice versa
  • Using default together with an order for --order-by or the executionOrder XML configuration attribute, for instance default,random, triggers a deprecation for using more than one order, although default resets the order instead of selecting one
  • --fail-on-skipped does 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 calls markTestSkipped(), although its tests are counted as skipped
  • --stop-on-skipped does not stop the test run when a test class is skipped, for instance because its before-first-test method calls markTestSkipped()
  • When coverage contribution is required, a test is considered risky because it does not contribute to code coverage although it executed covered code, when the code coverage driver collects hit counts and each covered line that the test executed was executed more than once
  • When PHPUnit is installed using Composer, code units in the PHPUnit\ or SebastianBergmann\ 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 available
  • Code from sebastian/file-filter and sebastian/git-state is not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
  • Code from nikic/php-parser and parts of the code from phar-io/manifest are not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.6: PHPUnit 13.4.6

Compare Source

Changed
  • Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
  • Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
Fixed
  • When 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 with Method name is not configured
  • When a hook method of a test, for instance setUp(), marks the test as incomplete, the hook method is reported as failed
  • When an "after test" method, for instance tearDown(), marks a successful test as incomplete or skips it, the test is reported as failed
  • When a before-first-test method, for instance setUpBeforeClass(), calls markTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is when markTestSkipped() is called
  • When an after-last-test method, for instance tearDownAfterClass(), calls markTestIncomplete() or markTestSkipped() 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 isolation
  • A failed PHP assertion, made using assert(), 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 method
  • When an assertion fails in an "after test" method, for instance tearDown(), 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 and onNotSuccessfulTest() is called with the failure from the "after test" method instead of the test's own
  • When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance tearDown(), is reported in addition to the test's failure, so the test is counted more than once
  • A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when requireCoverageMetadata="true" is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
  • The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in setUpBeforeClass()
  • Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of --debug and in the logfiles written by --log-events-text and --log-events-verbose-text
  • Groups configured for a test directory or test file using the groups attribute of <directory> or <file> in the XML configuration file are not assigned to PHPT tests, so --group and --exclude-group do not select them and --list-groups and --list-tests-xml report them as being in the default group or not at all
Removed
  • The library PHAR (phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.5: PHPUnit 13.4.5

Compare Source

Fixed
  • The static analysis cache directory that is automatically created in the operating system's path used for temporary files when no cache directory is configured is not used when the POSIX extension is not loaded

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.4: PHPUnit 13.4.4

Compare Source

Fixed
  • The TeamCity logger writes testSuiteFinished twice for a test class when one of its before-first-test methods errors or fails
  • The TestDox output shows a less important outcome of a test that has more than one outcome, for instance the failure in tearDown() of a test that errored
  • When the test run is interrupted by a signal while a test is run in process isolation, the result of the test is discarded and the test is counted as passed, and the TestDox output cannot be printed
  • When no static analysis cache directory is configured, the cache directory that is automatically created in the operating system's path used for temporary files is also used when it was created by another user or can be written to by other users
  • The directory in the operating system's path used for temporary files in which the temporary files for collecting code coverage for a PHPT test are created has a fixed name, and is also used when it was created by another user, who can then replace the code of the PHPT test before it is executed

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.3: PHPUnit 13.4.3

Compare Source

Fixed
  • The dependencies of a test that are listed after a dependency on a test that does not return a value, or after a dependency on a larger test, were not checked, so the test was run instead of being skipped when one of these dependencies had not passed
  • Tests could not be run in process isolation when the namespace of the test class begins with a name that the code of the child process imports, for instance CodeCoverage or Facade
  • A test that is run in process isolation aborts the test run when its data set or a value returned by a test it depends on cannot be serialized, for instance because it is a closure
  • When a before-first-test method or an after-last-test method errors or fails, the remaining methods of the same kind are still called, and each of them that does not error or fail itself is reported with the exception of the earlier method
  • When a hook method of a test, for instance a #[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 errors
  • An error or failure in a before-first-test method or an after-last-test method that is called again in the child process of a test that is run in process isolation is reported twice, once for the test class and once for the test
  • When a before-first-test method errors, the progress output shows one E for 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 error
  • When a before-first-test method fails, the progress output shows nothing for the tests of the test class and only one of them is counted as run
  • The Open Test Reporting XML logfile has no start for a test that errors before it is prepared, for instance because it depends on a test that does not exist, and no end for the test that is run after a test that is skipped because a test it depends on did not pass or because one of its
    requirements is not met
  • The Open Test Reporting XML logfile has no entry for a test that is marked as incomplete before it is prepared, for instance in setUp(), and reports the test that is run after it as aborted with the message of the incomplete test
  • The Open Test Reporting XML logfile has no end for the test that is run after a test whose preparation errors, for instance because setUp() raises an exception or the global state cannot be backed up
  • The Open Test Reporting XML logfile reports a test that has more than one outcome, for instance because tearDown() 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
  • The Open Test Reporting XML logfile is not well-formed when a test name, a message, the output of a test, or the string representation of an exception contains ]]>, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSI
    escape sequence
  • The Open Test Reporting XML logfile reports an issue that is triggered before a test is prepared, for instance in setUp(), with an empty ID before the start of the test

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.2: PHPUnit 13.4.2

Compare Source

Fixed
  • #​7033: Compact printer is created although an extension replaces the progress output
  • #​7035: Sorting tests by duration recomputes the duration of a test suite for every comparison
  • Sorting tests by size recomputes the size of a test suite for every comparison
  • expectUserDeprecationMessage() and expectUserDeprecationMessageMatches() did not see the deprecations triggered by an attempt of a retried test and saw those of the previously run test instead
  • The status of a test whose mock object raises an exception in its destructor is success although the test is reported as errored, so #[Retry] does not retry the test, --repeat does not skip the remaining repetitions, tearDown() sees the wrong status, and code coverage records the test as successful
  • Named arguments passed to with() 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 $b was not checked
  • String keys of the parameter sets passed to withParameterSetsInOrder(), withParameterSetsInAnyOrder(), and withParameterSetsInPartialOrder() were ignored, so a parameter set such as ['b' => 7] compared the expected value with the first parameter of the method and the parameter
    named $b was not checked

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.1: PHPUnit 13.4.1

Compare Source

Changed
  • The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
Fixed
  • #​7029: TestSuite::runTests() doubles garbage collector time when zend.exception_ignore_args is off
  • setUpBeforeClass() and tearDownAfterClass() 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
  • Tests could not be run in process isolation when the path of the bootstrap script, the test file, or the directory for temporary files contained a single quote
  • Arguments in the --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-- section
  • Recording the tests that passed in a child process copied all tests that had passed so far, which made running many tests in process isolation increasingly slow

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.4.0: PHPUnit 13.4.0

Compare Source

Added
  • #​6585: executionOrder attribute values and --order-by token lists that spell the order before defects, for example duration-ascending,defects
  • #​6585: pipeline() on the TestSuite\Sorted event for inspecting which reordering stages were applied
  • #​6686: Constraint::negatedToString() and Constraint::negatedFailureDescription() for authoring the description of a constraint that is wrapped in LogicalNot
  • #​6863: Cache which tests a test file contains
  • #​6957: Allow ordering tests by the time their source files were last modified
  • #​6958: Select the tests that are in all of several groups
  • #​6960: Record the order in which methods of mock objects are invoked
  • #​6964: #[RequiresClass] attribute to skip a test if a class does not exist
  • #​6995: ChildProcessExtension interface for extensions that need to be bootstrapped in the child process of a test that runs in process isolation
  • --coverage-jsonl CLI 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
  • --timeout CLI option to limit the wall-clock time of the entire test run
  • requireCoverageMetadataOnSmallTests, requireCoverageMetadataOnMediumTests, and requireCoverageMetadataOnLargeTests attributes for the XML configuration file to require code coverage metadata depending on the size of a test; these have precedence over requireCoverageMetadata
Changed
  • Output printed by a test is now shown in the compact output as a --- OUTPUT: record that is attributed to the test instead of being passed through unformatted; the record is omitted when beStrictAboutOutputDuringTests or --disallow-test-output already reports the output as risky
Deprecated
  • #​6585: Writing defects before the order for --order-by and executionOrder, which will change meaning in PHPUnit 14
  • #​6585: depends and no-depends for --order-by and executionOrder
  • #​6585: Configuring more than one order for --order-by and executionOrder
  • #​6585: Unknown values for the executionOrder XML configuration attribute, which are currently ignored
  • #​6686: Constraint::failureDescriptionInContext() and LogicalNot::negate()
  • #​6999: Class-level #[Group], #[Ticket], #[Small], #[Medium], and #[Large] on parent classes of test classes
Fixed
  • Issues that are listed in the baseline are not ignored for tests that are run in a separate process
  • A test that is run in process isolation aborts the test run when its result cannot be unserialized, for instance because it returns an object that holds a test double
  • A test that uses #[DataProviderClosure] errors when it is run in process isolation

Learn how to install or update PHPUnit 13.4 in the documentation.

Keep up to date with PHPUnit:

v13.3.6: PHPUnit 13.3.6

Compare Source

Fixed
  • The first attempt of a test that is retried is reported as attempt 1 of 1 in events, instead of attempt 1 of the configured maximum number of attempts
  • The class name argument of #[RequiresMethod] is declared as class-string, so static analysis reports an error when it refers to a class that does not exist
  • A #[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 test

Learn how to install or update PHPUnit 13.3 in the documentation.

Keep up to date with PHPUnit:

v13.3.5: PHPUnit 13.3.5

Compare Source

Changed
  • Control characters and ANSI escape sequences in user-supplied strings such as test names, data set names, and messages are now made visible as \u{NNNN} escape sequences instead of being passed through to the terminal
  • Control characters in user-supplied strings are now also made visible in the compact output
  • Line feeds in the name of a test no longer break the header line of a record in the compact output

Learn how to install or update PHPUnit 13.3 in the documentation.

Keep up to date with PHPUnit:

v13.3.4: PHPUnit 13.3.4

Compare Source

Fixed
  • #​6965: Temporary file used by SourceMapper may be deleted prematurely
  • The compact output displays details on PHPUnit deprecations and PHPUnit notices even when --display-phpunit-deprecations and --display-phpunit-notices are not used
  • The summary line of the compact output does not report the number of PHPUnit deprecations, PHPUnit notices, and PHPUnit warnings

Learn how to install or update PHPUnit 13.3 in the documentation.

Keep up to date with PHPUnit:

v13.3.3: PHPUnit 13.3.3

Compare Source

Fixed
  • Paths of included files are now escaped when generating the code that is executed in a separate process, so that a path containing special characters no longer produces broken code
  • Tests of a test class that is skipped as a whole are missing from the TestDox output
  • A test that is skipped or marked incomplete before it started is missing from the TestDox output
  • A test that is marked incomplete bef

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 04559b0 to 6493ad5 Compare May 27, 2026 14:08
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 6493ad5 to 9805044 Compare June 4, 2026 08:38
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 9805044 to 3918dc9 Compare June 16, 2026 00:43
@codecov

codecov Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.90%. Comparing base (aad9c16) to head (6ddbb26).

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 3918dc9 to f52d302 Compare June 30, 2026 17:12
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch 2 times, most recently from f7b6f00 to 6ea2959 Compare July 25, 2026 09:59
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 6ea2959 to 6824809 Compare August 4, 2026 17:12
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 6824809 to ae0bfa9 Compare September 7, 2026 20:28
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from ae0bfa9 to fada75c Compare September 15, 2026 09:11
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch 2 times, most recently from 6ddbb26 to 1b8adad Compare October 1, 2026 04:53
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from 1b8adad to c5bcc97 Compare November 19, 2026 20:11
@renovate
renovate Bot force-pushed the renovate/phpunit-phpunit-13.x branch from c5bcc97 to 7476510 Compare December 4, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants