Shift with red gradient lettering

PHPUnit 12 Shift

The PHPUnit 12 Shift automates the upgrade of your PHPUnit 10 test suite to PHPUnit 12. Using the PHPUnit 12 Shift to automatically upgrade your PHPUnit test suite has an estimated time savings of 30 minutes.

PHPUnit 12 is the latest stable release. This means both PHPUnit and the PHPUnit 12 Shift will continue to receive updates.

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

Requirements

  • Running PHP 8.3 or higher.
  • Previously running PHPUnit 11 or higher.
  • Test classes within the tests folder.

Automated Changes

  • Updating phpunit/phpunit composer dependency to ^12.0.
  • Bumping community package dependencies for PHPUnit 12.
  • Detecting calls to deprecated features, such as assertions and attributes.
  • Adopting PHP attributes instead of DocBlock annotations in test classes.
  • Marking data providers as static.
  • Adding return types to test cases and data providers.
  • Declaring test classes as final.

Manual Changes

While the PHPUnit 12 Shift addresses most of the backward incompatible changes, you may wish to review the CHANGELOG for additional details.

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.