Shift with red gradient lettering
Loading navigation...

PHPUnit 6 Shift

The PHPUnit 6 Shift automates the upgrade of your PHPUnit 5 test suite to PHPUnit 6. Using the PHPUnit 6 Shift to automatically upgrade your PHPUnit test suite has an estimated time savings of 1 hour.

Screenshot of a pull request with automated changes from the PHPUnit 6 Shift

Requirements

  • Running PHP 7.0 or higher.
  • Previously running PHPUnit 4 or higher.
  • Test class within the tests folder.

Automated Changes

  • Converting references to the PHPUnit_Framework PSR-0 namespace to their respective PSR-4 references.
  • Updating phpunit/phpunit composer dependency to ^8.0.
  • Modernizing PHP syntax, such as short arrays.

Manual Changes

While the PHPUnit 6 Shift addresses backward incompatible changes, there are also deprecations you may wish to review manually.