Shift with red gradient lettering

PHPUnit 11 Shift

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

Requirements

  • Running PHP 8.2 or higher.
  • Previously running PHPUnit 10 or higher.
  • Test classes within the tests folder.

Automated Changes

  • Updating phpunit/phpunit composer dependency to ^11.0.
  • Bumping community package dependencies for PHPUnit 11.
  • 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 11 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.