Skip to content

Upgrading orchestra/testbench 8 to 9

Breakingv8.39.0 → v9.18.0Breaking2Platform2Deprecated5New44Changed92Fixed28Other3

BreakingUpgrade verdict

2 breaking changes and 2 platform requirement changes.

  • Code that used the old database connections trait will no longer work.
  • The old commands for creating and dropping the SQLite test database are gone.
  • Adds draft support for PHP 8.4.
  • You now need PHP 8.2 or newer to use this package.
Top 5 of 9 that need code or config changes

PHP requirement changed in v9.0.0: ^8.1 → ^8.2.

Breaking2
Removes the deprecated Orchestra\Testbench\Concerns\Database\HandlesConnections trait.
Orchestra\Testbench\Concerns\Database\HandlesConnections
Removes the deprecated create-sqlite-db and drop-sqlite-db standalone commands.
create-sqlite-dbdrop-sqlite-db
Platform2
Adds draft support for PHP 8.4.
Increases the minimum PHP version to 8.2, tested with 8.2 and 8.3.
Deprecated5
Deprecates the @environment-setup, @define-env, @define-database and @define-route PHPUnit annotations.
@environment-setup@define-env@define-database@define-route
Re-adds the deprecated getBasePath() method, pending removal in Testbench 10.0.
getBasePath()
Deprecates the HandleTerminatingConsole trait in favor of the TerminatingConsole class.
Orchestra\Testbench\Foundation\Console\Concerns\HandleTerminatingConsoleOrchestra\Testbench\Foundation\Console\TerminatingConsole
Deprecates Orchestra\Testbench\laravel_migration_path() in favor of default_migration_path().
Orchestra\Testbench\laravel_migration_path()default_migration_path()
Deprecates Orchestra\Testbench\Concerns\HandlesAnnotations because PHPUnit no longer supports meta-comment annotations.
Orchestra\Testbench\Concerns\HandlesAnnotations