The PHPUnit 9 Shift reviews your tests for any backward incompatible changes and automates the upgrade process to PHPUnit 9.
- Running PHP 7.3 or higher.
- Previously running PHPUnit 8 or higher.
- Test classes within the
- Adding return types to core
phpunit/phpunitcomposer dependency to
- Converting uses of the removed
assertInternalTypeto its type specific equivalent.
- Detecting uses of the removed
assertContainsand converting to the
stringassertion when appropriate.
- Automating the changes for renamed or methods such as
- Detecting uses of removed annotations and assertions, such as
- Modernizing PHP syntax, such as the short array syntax.
While the PHPUnit 9 Shift addresses most of the backward incompatible changes, you may wish to review the release notes for additional details.