Here is a guide to upgrading a test suite or an extension, based on BC-breaking changes made in phpspec 3.
If you are using 3rd party phpspec extensions, you may have to increase the version numbers for those as well.
As PHP 5.5 and below are no longer supported language versions, you will need to upgrade to PHP 5.6 or 7.0+ to use phpspec 3.
Where you have used @param annotations for spec examples, to indicate the required type for a collaborator, you will need to remove these and use explicit typehinting in the method signature instead. For example:
/** * @param \stdClass $collaborator */ function it_does_something_with_a_stdclass($collaborator)
function it_does_something_with_a_stdclass(\stdClass $collaborator)
Extension configured in your
phpspec.yml needs to be changed from:
some_extension_config: foo extensions: - SomeExtension - SomeOtherExtension
extensions: SomeExtension: some_config: foo SomeOtherExtension: ~