Repository navigation
Releases
Releases · sebastianbergmann/phpunit
PHPUnit 13.4.7
Immutable
release. Only release title and notes can be modified.
Fixed
- When an order is configured on the command line, for instance using
--order-by random,defectsconfigured using theexecutionOrderattribute in the XML configuration file is still applied, and vice versa - Using
defaulttogether with an order for--order-byor theexecutionOrderXML configuration attribute, for instancedefault,random, triggers a deprecation for using more than one order, althoughdefaultresets the order instead of selecting one --fail-on-skippeddoes 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 callsmarkTestSkipped(), although its tests are counted as skipped--stop-on-skippeddoes not stop the test run when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped()- 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\orSebastianBergmann\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-filterandsebastian/git-stateis 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-parserand parts of the code fromphar-io/manifestare 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:
- 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.44
Immutable
release. Only release title and notes can be modified.
Fixed
- When an order is configured on the command line, for instance using
--order-by random,defectsconfigured using theexecutionOrderattribute in the XML configuration file is still applied, and vice versa --fail-on-skippeddoes 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 callsmarkTestSkipped(), although its tests are counted as skipped--stop-on-skippeddoes not stop the test run when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped()- When PHPUnit is installed using Composer, code units in the
PHPUnit\orSebastianBergmann\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
nikic/php-parserand parts of the code fromphar-io/manifestare 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 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 11.5.58
Immutable
release. Only release title and notes can be modified.
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)
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 11.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 10.5.67
Immutable
release. Only release title and notes can be modified.
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)
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 10.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 9.6.39
Immutable
release. Only release title and notes can be modified.
Changed
- 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)
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 9.6 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 8.5.57
Immutable
release. Only release title and notes can be modified.
Changed
- 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)
Removed
- The library PHAR (
phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 8.5.19
Learn how to install or update PHPUnit 8.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.6
Immutable
release. Only release title and notes can be modified.
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 withMethod 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(), callsmarkTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is whenmarkTestSkipped()is called - When an after-last-test method, for instance
tearDownAfterClass(), callsmarkTestIncomplete()ormarkTestSkipped()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 andonNotSuccessfulTest()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
--debugand in the logfiles written by--log-events-textand--log-events-verbose-text - Groups configured for a test directory or test file using the
groupsattribute of<directory>or<file>in the XML configuration file are not assigned to PHPT tests, so--groupand--exclude-groupdo not select them and--list-groupsand--list-tests-xmlreport them as being in thedefaultgroup 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
Immutable
release. Only release title and notes can be modified.
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 withMethod 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(), callsmarkTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is whenmarkTestSkipped()is called - When an after-last-test method, for instance
tearDownAfterClass(), callsmarkTestIncomplete()ormarkTestSkipped()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 andonNotSuccessfulTest()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
--debugand in the logfiles written by--log-events-textand--log-events-verbose-text - Groups configured for a test directory or test file using the
groupsattribute of<directory>or<file>in the XML configuration file are not assigned to PHPT tests, so--groupand--exclude-groupdo not select them and--list-groupsand--list-tests-xmlreport them as being in thedefaultgroup 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
Immutable
release. Only release title and notes can be modified.
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
Immutable
release. Only release title and notes can be modified.
Fixed
- The TeamCity logger writes
testSuiteFinishedtwice 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.