Skip to content

Release Announcement for PHPUnit 4.0.0

Sebastian Bergmann edited this page Mar 7, 2014 · 18 revisions

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

New Release Process

PHPUnit 4.0.0 is the first version of PHPUnit that follows our new release process. It is also the first release of PHPUnit to ship new features since September of 2012 when PHPUnit 3.7 was released. Our goal with the new release process is to deliver new features into the hands of our users every two months.

New Features

PHPUnit 4.0 introduces many new features. Here is a list of the highlights:

  • Support for HHVM
  • Test Proxies for more effective integration testing
  • Support for the @before, @after, @beforeClass and @afterClass annotations

Removed Features

The limited support for stubbing and mocking static methods that was introduced in PHPUnit 3.5 has been removed. This feature only worked when the stubbed or mocked static method was invoked from another method of the same class. We believe that the limited use of this feature did not justify the increased complexity in the test doubles code generator it incurred. We apologize for any inconvenience this removal may cause and encourage refactoring the code under test to not require this feature for testing.

Obtaining PHPUnit 4.0

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 or the PEAR Installer to download and install PHPUnit as well as its dependencies.

Please note that starting with PHPUnit 4.0.0 the PEAR package of PHPUnit is merely a distribution mechanism for the PHP Archive (PHAR) and that many of PHPUnit's dependencies will no longer be released individually via PEAR. We will eventually stop making releases of PHPUnit available via PEAR altogether.

Clone this wiki locally