Skip to content

Releases: sebastianbergmann/phpunit

PHPUnit 12.2.5

27 Jun 04:39
12.2.5
b71849b
Compare
Choose a tag to compare

Fixed

  • #6249: No meaningful error when <testsuite> element is missing required name attribute

How to install or update PHPUnit

PHPUnit 11.5.25

27 Jun 04:39
11.5.25
864ab32
Compare
Choose a tag to compare

Fixed

  • #6249: No meaningful error when <testsuite> element is missing required name attribute

How to install or update PHPUnit

PHPUnit 12.2.4

26 Jun 15:06
12.2.4
63f7846
Compare
Choose a tag to compare

Changed

  • Including information about the Git repository (such as the commit hash and branch name) in the Open Test Reporting XML format is now an opt-in feature that can be enabled via the --include-git-information CLI option or the includeGitInformation attribute in the XML configuration file

How to install or update PHPUnit

PHPUnit 12.2.3

20 Jun 11:37
12.2.3
60a8ea2
Compare
Choose a tag to compare

Added

  • #6236: failOnPhpunitWarning attribute on the <phpunit> element of the XML configuration file and --fail-on-phpunit-warning CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: true)
  • #6239: --do-not-fail-on-deprecation, --do-not-fail-on-phpunit-warning, --do-not-fail-on-phpunit-deprecation, --do-not-fail-on-empty-test-suite, --do-not-fail-on-incomplete, --do-not-fail-on-notice, --do-not-fail-on-risky, --do-not-fail-on-skipped, and --do-not-fail-on-warning CLI options
  • --do-not-report-useless-tests CLI option as a replacement for --dont-report-useless-tests

Deprecated

  • --dont-report-useless-tests CLI option (use --do-not-report-useless-tests instead)

Fixed

  • #6243: Constraints cannot be implemented without using internal class ExpectationFailedException

How to install or update PHPUnit

PHPUnit 11.5.24

20 Jun 11:37
11.5.24
6b07ab1
Compare
Choose a tag to compare

Added

  • #6236: failOnPhpunitWarning attribute on the <phpunit> element of the XML configuration file and --fail-on-phpunit-warning CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: true)
  • #6239: --do-not-fail-on-deprecation, --do-not-fail-on-phpunit-warning, --do-not-fail-on-phpunit-deprecation, --do-not-fail-on-empty-test-suite, --do-not-fail-on-incomplete, --do-not-fail-on-notice, --do-not-fail-on-risky, --do-not-fail-on-skipped, and --do-not-fail-on-warning CLI options
  • --do-not-report-useless-tests CLI option as a replacement for --dont-report-useless-tests

Deprecated

  • --dont-report-useless-tests CLI option (use --do-not-report-useless-tests instead)

Fixed

  • #6243: Constraints cannot be implemented without using internal class ExpectationFailedException

How to install or update PHPUnit

PHPUnit 10.5.47

20 Jun 11:37
10.5.47
3637b3e
Compare
Choose a tag to compare

Added

  • #6236: failOnPhpunitWarning attribute on the <phpunit> element of the XML configuration file and --fail-on-phpunit-warning CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: true)
  • #6239: --do-not-fail-on-deprecation, --do-not-fail-on-phpunit-warning, --do-not-fail-on-phpunit-deprecation, --do-not-fail-on-empty-test-suite, --do-not-fail-on-incomplete, --do-not-fail-on-notice, --do-not-fail-on-risky, --do-not-fail-on-skipped, and --do-not-fail-on-warning CLI options
  • --do-not-report-useless-tests CLI option as a replacement for --dont-report-useless-tests

Deprecated

  • --dont-report-useless-tests CLI option (use --do-not-report-useless-tests instead)

Fixed

  • #6243: Constraints cannot be implemented without using internal class ExpectationFailedException

How to install or update PHPUnit

PHPUnit 12.2.2

13 Jun 05:50
12.2.2
19e25c2
Compare
Choose a tag to compare

Fixed

  • #6222: Data Provider seems to mess up Test Dependencies
  • shortenArraysForExportThreshold XML configuration setting has no effect on all arrays exported for event-related value objects

How to install or update PHPUnit

PHPUnit 11.5.23

13 Jun 05:48
11.5.23
86ebcd8
Compare
Choose a tag to compare

Fixed

  • #6222: Data Provider seems to mess up Test Dependencies
  • shortenArraysForExportThreshold XML configuration setting has no effect on all arrays exported for event-related value objects

How to install or update PHPUnit

PHPUnit 12.2.1

07 Jun 05:19
12.2.1
5f09fda
Compare
Choose a tag to compare

Fixed

  • #6228: Variadic test methods should not warn about too many arguments from data provider

How to install or update PHPUnit

PHPUnit 12.2.0

06 Jun 02:59
12.2.0
f3f6587
Compare
Choose a tag to compare

Added

Experimental Support for Open Test Reporting XML

PHPUnit has supported reporting test results in the JUnit XML format for a long time. Unfortunately, there has never been a standard schema for the JUnit XML format. Common consumers of Clover XML log files interpret these files differently, which has led to frequent problems.

To address this, the JUnit team started the Open Test Reporting project, creating and maintaining language-agnostic XML and HTML test reporting formats. Unlike JUnit XML, Open Test Reporting's XML formats are extensible.

Logging in the Open Test Reporting XML format is controlled by the new --log-otr CLI option and the new <otr> XML configuration element.

This feature is experimental and the generated XML may change in order to enhance compliance with the Open Test Reporting project's XML schema definitions. The same applies to the XML schema definitions for information that is specific for PHP and PHPUnit. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.

Experimental Support for OpenClover XML

PHPUnit has supported reporting code coverage information in the Clover XML format for a long time. Unfortunately, there has never been a standard schema for the Clover XML format. Common consumers of Clover XML log files interpret these files differently, which leads to frequent problems.

The original commercial Clover project has been superseded by the Open Source OpenClover project, which provides an XML schema for its OpenClover XML format. Rather than modifying the existing Clover XML reporter to comply with the OpenClover XML schema, thereby breaking backward compatibility, a new OpenClover XML reporter has been introduced.

This new reporter is controlled by the new CLI option, --coverage-openclover, and the new XML configuration element, <openclover>. This code coverage reporter generates XML documents that validate against the OpenClover project's XML schema definition, with one exception: the <testproject> element is not generated.

The existing Clover XML reporter, controlled by the --coverage-clover CLI option and the <clover> XML configuration element, remains unchanged.

This feature is experimental and the generated XML may change to enhance compliance with the OpenClover XML schema definition. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.

Miscellaneous

  • --with-telemetry CLI option that can be used together with --debug to print debugging information that includes telemetry information
  • The TestCase::provideAdditionalInformation() method can now be used to emit a Test\AdditionalInformationProvided event
  • The new Test\AfterLastTestMethodFailed, Test\AfterTestMethodFailed, Test\BeforeFirstTestMethodFailed, Test\BeforeTestMethodFailed, Test\PostConditionFailed, Test\PreConditionFailed events are now emitted instead of Test\AfterLastTestMethodErrored, Test\AfterTestMethodErrored, Test\BeforeFirstTestMethodErrored, Test\BeforeTestMethodErrored, Test\PostConditionErrored, Test\PreConditionErrored when the Throwable extends AssertionFailedError to distinguish between errors and failures triggered in hook methods
  • The new Test\PreparationErrored event is now emitted instead of Test\PreparationFailed when the Throwable does not extend AssertionFailedError to distinguish between errors and failures triggered during test preparation
  • Test\PreparationFailed::throwable()

Changed

  • #6165: Collect deprecations triggered by autoloading while loading/building the test suite
  • Do not treat warnings differently than other issues in summary section of default output
  • A warning is now emitted when both #[CoversNothing] and #[Covers*] (or #[Uses*]) are used on a test class
  • A warning is now emitted when the same #[Covers*] (or #[Uses*]) attribute is used multiple times on a test class
  • A warning is now emitted when the same code is targeted by both #[Covers*] and #[Uses*] attributes
  • A warning is now emitted when a hook method such as setUp(), for example has a #[Test] attribute
  • A warning is now emitted when more than one of #[Small], #[Medium], or #[Large] is used on a test class
  • A warning is now emitted when a data provider provides data sets that have more values than the test method consumes using arguments

How to install or update PHPUnit