Release Announcement for PHPUnit 5.2.0

Sebastian Bergmann edited this page Feb 8, 2017 · 4 revisions

The PHPUnit development team announces the immediate availability of PHPUnit 5.2.0. This release adds new features and fixes bugs. A detailed list of changes is available here.

New Features

  • A test that does not execute the code it wants to test (as expressed using the @covers annotation) can now be optionally marked as risky
  • A test that performs an assertion on a test double can now be optionally marked as risky
  • The PHPUnit_Framework_TestCase::expectException(), PHPUnit_Framework_TestCase::expectExceptionCode(), PHPUnit_Framework_TestCase::expectExceptionMessage(), and PHPUnit_Framework_TestCase::expectExceptionMessageRegExp() methods have been added for programmatically setting expectations for exceptions
  • The @requires annotation now supports PHP extension versions
  • The annotations that control the ignoring of code coverage can now be disabled


  • The PHPUnit_Framework_TestCase::setExpectedException() method has been deprecated
  • The checkForUnintentionallyCoveredCode configuration setting has been deprecated (use beStrictAboutCoversAnnotation instead)


  • The mapTestClassNameToCoveredClassName configuration setting has been removed

Obtaining PHPUnit 5.2

We distribute a PHP Archive (PHAR) that contains everything you need in order to use PHPUnit. Simply download it from here, make it executable, and put it into your $PATH, for instance.

Alternatively, you may use Composer to download and install PHPUnit as well as its dependencies.


PHPUnit 5.2 requires PHP 5.6; using the latest version of PHP is highly recommended. The documentation has a detailed list of the PHP extensions that are required to use PHPUnit.

Looking Ahead

The goal of our release process is to deliver new features into the hands of our users every two months. The following releases are currently in development:

  • PHPUnit 5.3 is the current beta release series of PHPUnit. It will become stable on April 1, 2016.
  • PHPUnit 5.4 is the current alpha release series of PHPUnit. It will become stable on June 3, 2016.

PHPUnit 6

PHPUnit 6, which is scheduled for February 3, 2017, will no longer support PHP 5. As PHPUnit follows Semantic Versioning the major version number must be incremented when the minimum required version of PHP is increased.

Support for PHPUnit 5

Following our release process, PHPUnit 5 will receive bug fixes until February 2, 2018.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.