PHPUnit 8 Shift

The PHPUnit 8 Shift reviews your tests for any backward incompatible changes and automate the upgrade process to PHPUnit 8.


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

Automated Changes

  • Adding return types to core TestCase methods.
  • Updating phpunit/phpunit composer dependency to ^8.0.
  • Modernizing PHP syntax, such as the short array syntax.

Manual Changes

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

Still have questions? Message @laravelshift on Twitter or email