Skip to content

Releases: sebastianbergmann/phpunit

PHPUnit 9.6.23

02 May 06:42
9.6.23
43d2cb1

Choose a tag to compare

Changed

  • #5956: Improved handling of deprecated E_STRICT constant
  • Improved message when test is considered risky for printing unexpected output

How to install or update PHPUnit

PHPUnit 8.5.42

02 May 06:38
8.5.42
3a68a70

Choose a tag to compare

Changed

  • #5956: Improved handling of deprecated E_STRICT constant
  • Improved message when test is considered risky for printing unexpected output

How to install or update PHPUnit

PHPUnit 12.1.3

22 Apr 06:12
12.1.3
72ca50e

Choose a tag to compare

Changed

  • When gathering the telemetry information that each event has, the real size of memory allocated from the operating system is no longer used as this is grown by PHP's memory manager in chunks that are so large that small(er) increases in peak memory usage cannot be seen
  • The peak memory usage returned by memory_get_peak_usage() is now reset immediately before the Test\Prepared event is emitted using memory_reset_peak_usage() so that (memory usage at Test\Finished - memory usage at Test\Prepared) is a better approximation of the memory usage of the test
  • The string representation of Telemetry\Info now uses peak memory usage instead of memory usage (this affects --log-events-verbose-text)

Fixed

  • #6173: Output from error_log() is not displayed when test fails
  • A "Before Test Method Errored" event is no longer emitted when a test is skipped in a "before test" method

How to install or update PHPUnit

PHPUnit 11.5.18

22 Apr 06:12
11.5.18
fc3e887

Choose a tag to compare

Changed

  • When gathering the telemetry information that each event has, the real size of memory allocated from the operating system is no longer used as this is grown by PHP's memory manager in chunks that are so large that small(er) increases in peak memory usage cannot be seen
  • The peak memory usage returned by memory_get_peak_usage() is now reset immediately before the Test\Prepared event is emitted using memory_reset_peak_usage() so that (memory usage at Test\Finished - memory usage at Test\Prepared) is a better approximation of the memory usage of the test
  • The string representation of Telemetry\Info now uses peak memory usage instead of memory usage (this affects --log-events-verbose-text)

Fixed

  • A "Before Test Method Errored" event is no longer emitted when a test is skipped in a "before test" method

How to install or update PHPUnit

PHPUnit 12.1.2

08 Apr 08:06
12.1.2
6f2775c

Choose a tag to compare

Fixed

  • #6104: Reverted change introduced in PHPUnit 12.1.1

How to install or update PHPUnit

PHPUnit 12.1.1

08 Apr 06:38
12.1.1
3647ca0

Choose a tag to compare

Fixed

  • #6104: Test with dependencies and data provider fails
  • #6174: willReturnMap() fails with nullable parameters when their default is null and no argument is passed for them

How to install or update PHPUnit

PHPUnit 11.5.17

08 Apr 08:00
11.5.17
fd2e863

Choose a tag to compare

Fixed

  • #6104: Reverted change introduced in PHPUnit 11.5.16

How to install or update PHPUnit

PHPUnit 11.5.16

08 Apr 06:38
11.5.16
8c37a98

Choose a tag to compare

Fixed

  • #6104: Test with dependencies and data provider fails
  • #6174: willReturnMap() fails with nullable parameters when their default is null and no argument is passed for them

How to install or update PHPUnit

PHPUnit 12.1.0

04 Apr 04:12
12.1.0
c433e79

Choose a tag to compare

Added

  • #6118: expectErrorLog() for expecting error_log() output
  • #6126: Attribute #[WithEnvironmentVariable] for setting an environment variable for the duration of a test
  • The AfterTestMethodCalled, AfterTestMethodErrored, AfterTestMethodFinished, BeforeTestMethodCalled, BeforeTestMethodErrored, BeforeTestMethodFinished, PostConditionCalled, PostConditionErrored, PostConditionFinished, PreConditionCalled, PreConditionErrored, and PreConditionFinished event value objects now have test() method that returns a value object representing the test method for which the hook method was called

Changed

  • When code coverage processing is requested and no static analysis cache directory has been configured then a cache directory in the operating system's path used for temporary files is automatically created and used
  • The static analysis of first-party source files required for the code coverage functionality is now performed before the first test is run, if code coverage processing is requested (via the XML configuration file and/or CLI options), all first-party source files are configured to be processed (which is the default), and a static analysis cache directory is available (either explicitly configured or automatically determined, see above). This has the same effect as running phpunit --warm-coverage-cache before running tests.

Deprecated

  • #6140: The testClassName() method on the AfterTestMethodCalled, AfterTestMethodErrored, AfterTestMethodFinished, BeforeTestMethodCalled, BeforeTestMethodErrored, BeforeTestMethodFinished, PostConditionCalled, PostConditionErrored, PostConditionFinished, PreConditionCalled, PreConditionErrored, and PreConditionFinished event value objects (use test()->className() instead)

How to install or update PHPUnit

PHPUnit 12.0.10

23 Mar 16:05
12.0.10
6075843

Choose a tag to compare

Changed

  • #6150: Reverted change introduced in PHPUnit 12.0.8

How to install or update PHPUnit