PHPUnit 3.5

Last weekend, during the great PHP Unconference in Hamburg, I released PHPUnit 3.5. Back then I did not have the time to write a proper release announcement. This posting tries to make up for that.

What is new?

The biggest change in PHPUnit 3.5 is one that should not affect end-users in any way: PHPUnit has been refactored into multiple components. This will hopefully ease and speed up the development of PHPUnit in the future.

More details can be found in the ChangeLog.

Upgrading

Due to an issue with the PEAR Installer, a simple pear upgrade phpunit/phpunit will not work in most cases. Here is what you should do instead (only required for upgrading from PHPUnit < 3.5 to PHPUnit 3.5):

pear uninstall phpunit/PHPUnit
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit

If you are doing a fresh installation, just refer to the installation instructions in the PHPUnit Manual.

Please note that PHPUnit 3.5 requires PHP 5.2.7 (or later) but PHP 5.3.3 (or later) is highly recommended. Also note that PHP_CodeCoverage, the library that is used by PHPUnit 3.5 to collect and process code coverage information, depends on Xdebug 2.0.5 (or later) but Xdebug 2.1.0 (or later) is highly recommended.

Migration

  • Please no longer include PHPUnit/Framework.php. This file has been superseded by PHPUnit/Autoload.php. You do not need to include this file under normal circumstances.
  • If you are using __autoload(), you now need to use spl_autoload_register() to register your autoload function.

Support

Back in December 2009, PHPUnit development moved to GitHub. Up until recently, however, a Trac instance was still used to track tickets.

Now these tickets are tracked on GitHub:

  • Issues with PHPUnit's Code Coverage functionality should be reported here
  • Issues with PHPUnit's DatabaseTestCase functionality should be reported here
  • Issues with PHPUnit's SeleniumTestCase functionality should be reported here
  • Issues with PHPUnit's Mock Object functionality should be reported here
  • All other issues should be reported here