Shift with red gradient lettering

PHPUnit 8 Shift

The PHPUnit 8 Shift automates the upgrade of your PHPUnit 6 test suite to PHPUnit 8. Using the PHPUnit 8 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 9 Shift

Requirements

  • Running PHP 7.2 or higher.
  • Previously running PHPUnit 6 or higher.
  • Test classes within the tests folder.

Automated Changes

  • Adding return types to core TestCase methods.
  • Updating phpunit/phpunit composer dependency to ^8.0.
  • Converting uses of the deprecated assertInternalType to its type specific equivalent.
  • Detecting uses of the deprecated assertContains and converting to the string assertion when appropriate.
  • Modernizing PHP syntax, such as short arrays.

Manual Changes

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

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.