Skip to content

PHPUnit 13.5.1

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 09:38
Immutable release. Only release title and notes can be modified.
13.5.1
ede8276

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:

  • You can follow @phpunit@phpc.social to stay up to date with PHPUnit's development.
  • You can subscribe to the PHPUnit Updates newsletter to receive updates about and tips for PHPUnit.