Release Announcement for PHPUnit 5.4.0
Clone this wiki locally
The PHPUnit development team announces the immediate availability of PHPUnit 5.4.0. This release adds new features and fixes bugs. A detailed list of changes is available here.
PHPUnit\Framework\TestCase::createMock()method was added for creating a test double. The creation of this test double is performed using best practice defaults (it is not possible to create a mock for a class or interface that does not exist, the
__clone()methods of the original class are not executed and the arguments passed to a method of the test double will not be cloned). If these defaults are not what you need then you can use the
getMockBuilder()method to customize the test double generation using a fluent interface.
- The configuration option
registerMockObjectsFromTestArgumentsRecursivelywas added. When set to
true(its default is
false) arrays and objects graphs passed into tests using
@dataProviderare recursively scanned for mock objects so that they can be retain their behavior and expectations set up in the data provider when they are used in the test method.
PHPUnit\Framework\TestCase::getMock()method has been deprecated. Please use
PHPUnit\Framework\TestCase::getMockWithoutInvokingTheOriginalConstructor()method has been deprecated. Please use
Obtaining PHPUnit 5.4
Alternatively, you may use Composer to download and install PHPUnit as well as its dependencies.
PHPUnit 5.4 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.
The goal of our release process is to deliver new features into the hands of our users every two months. The next release with new features will be PHPUnit 5.5. It is currently in development and will become stable on August 4, 2016.
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.