Skip to content

Releases

PHPUnit 13.4.6

Choose a tag to compare

@github-actions github-actions released this 02 Nov 07:14
Immutable release. Only release title and notes can be modified.
13.4.6
4821376

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:

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

PHPUnit 12.5.43

Choose a tag to compare

@github-actions github-actions released this 02 Nov 07:11
Immutable release. Only release title and notes can be modified.
12.5.43
1d5a4a3

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

PHPUnit 13.4.5

Choose a tag to compare

@github-actions github-actions released this 27 Oct 04:18
Immutable release. Only release title and notes can be modified.
13.4.5
941457a

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:

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

PHPUnit 13.4.4

Choose a tag to compare

@github-actions github-actions released this 27 Oct 03:17
Immutable release. Only release title and notes can be modified.
13.4.4
71b681a

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:

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

PHPUnit 12.5.42

Choose a tag to compare

@github-actions github-actions released this 27 Oct 04:17
Immutable release. Only release title and notes can be modified.
12.5.42
1d6dbe7

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

PHPUnit 12.5.41

Choose a tag to compare

@github-actions github-actions released this 27 Oct 03:14
Immutable release. Only release title and notes can be modified.
12.5.41
191b2e0

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

Learn how to install or update PHPUnit 12.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.

PHPUnit 13.4.3

Choose a tag to compare

@github-actions github-actions released this 16 Oct 05:58
Immutable release. Only release title and notes can be modified.
13.4.3
2180c47

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:

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

PHPUnit 12.5.40

Choose a tag to compare

@github-actions github-actions released this 16 Oct 05:56
Immutable release. Only release title and notes can be modified.
12.5.40
76bd319

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 an end without an ID for a test that is marked as incomplete before it is prepared, for instance in setUp(), and no end for the test that is run after it
  • 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 has more than one end for a test that has more than one outcome, for instance because tearDown() fails after the test errored
  • The Open Test Reporting XML logfile is not well-formed when a test name, a message, 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

Learn how to install or update PHPUnit 12.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.

PHPUnit 13.4.2

Choose a tag to compare

@github-actions github-actions released this 12 Oct 15:30
Immutable release. Only release title and notes can be modified.
13.4.2
7b9ba83

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:

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

PHPUnit 12.5.39

Choose a tag to compare

@github-actions github-actions released this 12 Oct 15:29
Immutable release. Only release title and notes can be modified.
12.5.39
4e8cbea

Fixed

  • #7053: Extensions loaded using -d extension or -d zend_extension are not loaded in child processes
  • The status of a test whose mock object raises an exception in its destructor is success although the test is reported as errored, so 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
  • When code coverage is collected and no code coverage driver is available in a child process, a test that is run in process isolation errors and a PHPT test fails instead of a warning being emitted

Learn how to install or update PHPUnit 12.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.