This changelog references the relevant changes (bug and security fixes) done to orchestra/testbench
.
Released: 2024-12-01
- Update minimum support for Testbench Core v9.7.0+. (v9.6.2...v9.7.0)
- Added ability to detect Workbench namespace via
Orchestra\Testbench\Workbench\Workbench::detectNamespace()
method. - Added ability to detect the default user model via
Orchestra\Testbench\Workbench\Workbench::applicationUserModel()
method. - Added support for authentication routes within Workbench by configurating
workbench.auth
config totrue
. - Added new
package:sync-skeleton
command.
- Testbench Dusk integration improvements:
- Refactor
Orchestra\Testbench\Bootstrap\LoadConfiguration
andOrchestra\Testbench\Bootstrap\LoadConfigurationWithWorkbench
to allow being extended by Testbench Dusk. - Refactor
Orchestra\Testbench\Console\Commander
.
- Refactor
- Add
$tty
parameter toOrchestra\Testbench\remote()
function. - Refactor
Orchestra\Testbench\Foundation\Bootstrap\CreateVendorSymlink
class and mark it as@api
. - Add
$backupExistingFile
and$resetOnTerminating
parameter to following methods inOrchestra\Testbench\Foundation\Console\Concerns\CopyTestbenchFiles
trait:copyTestbenchConfigurationFile()
copyTestbenchDotEnvFile()
- Supports
laravel/serializable-closure
v2.
- Deprecate
Orchestra\Testbench\Foundation\Console\Concerns\HandleTerminatingConsole
trait, useOrchestra\Testbench\Foundation\Console\TerminatingConsole
class instead.
Released: 2024-11-20
- Update minimum support for Testbench Core v9.6.2+. (v9.6.0...v9.6.2)
- Fixes
route:cache
whenhealth: true
configured usingtestbench.yaml
. - Fixes compatibility with Laravel Framework v11.33.0.
Released: 2024-11-19
- Update minimum support for Testbench Core v9.6.0+. (v9.5.3...v9.6.0)
- Added
Orchestra\Testbench\Foundation\Bootstrap\DeleteVendorSymlink
class. - Added
Orchestra\Testbench\Concerns\InteractsWithMockery
trait. - Added
--database
option topackage:create-sqlite-db
command. - Added
--database
and--all
options topackage:drop-sqlite-db
command. - Added
Orchestra\Testbench\php_binary()
function. - Allows
laravel/serializable-closure
2. - Added draft support for PHP 8.4.
- Ensure database directory exists when running
package:create-sqlite-db
. - Allow configuring
PHP_CLI_SERVER_WORKERS
via Composer Script. - Improves
CTRL+C
andCTRL+BREAK
supports on Windows withoutpcntl
extension. Orchestra\Testbench\Foundation\Console\Actions\GeneratesFile
should be able to handle$from
and$to
when given asfalse
ornull
.
- Fixed
#[WithMigration('queue')]
should load the default migrations.
Released: 2024-10-06
- Update minimum support for Testbench Core v9.5.3+. (v9.5.2...v9.5.3)
- Prevent seeder from being executed when
shouldSeed()
exists and returnfalse
.
Released: 2024-10-05
- Update minimum support for Testbench Core v9.5.2+. (v9.5.0...v9.5.2)
- Listen to
SIGHUP
,SIGUSR1
, andSIGUSR2
signals via Testbench CLI. - Update
config/concurrency.php
configuration file.
- Fixes Testbench CLI signals via
serve
command to reset published.env
andtestbench.yaml
.
Released: 2024-09-23
- Update minimum support for Testbench Core v9.5.0+. (v9.4.0...v9.5.0)
- Added
Orchestra\Testbench\Attributes\RequiresDatabase
attribute class. - Added
markTestSkippedWhen()
andmarkTestSkippedUnless()
assertion helper to conditionally handlemarkTestSkipped()
. - Added
Orchestra\Testbench\default_migration_path()
helper function. - Added
Orchestra\Testbench\laravel_vendor_exists()
helper function. - Allows TestCase to inherit Attributes defined on parent TestCase by @BlackLanzer in #233.
- Allow Testbench to delete
vendor
symlink directory if it was created while running tests.
- Fixes
view.paths
configuration not being updated to includeworkbench/resources/views
due to IoC booting sequence.
- Deprecated
Orchestra\Testbench\laravel_migration_path()
, usedefault_migration_path()
instead.
Released: 2024-08-26
- Update minimum support for Testbench Core v9.4.0+. (v9.3.0...v9.4.0)
- Added
artisan
binary to Laravel skeleton. - Added
Orchestra\Testbench\join_paths()
function. - Added
Orchestra\Testbench\Attributes\UsesVendor
attribute class. - Added
defineStashRoutes()
method to register adhoc route for test.
- Improvements to
Orchestra\Testbench\default_skeleton_path()
,Orchestra\Testbench\package_path()
, andOrchestra\Testbench\workbench_path()
usage based on newOrchestra\Testbench\join_paths()
function.
Released: 2024-08-14
- Update minimum support for Testbench Core v9.3.0+. (v9.2.0...v9.3.0)
- Update
Orchestra\Testbench\Foundation\Console\Actions\GeneratesFile
to remove.gitkeep
file when directory contain one or more files. - Code Improvements.
- Fixes
InteractsWithPublishedFiles
should only flush published files withindatabase/migrations
directory.
Released: 2024-07-13
- Update minimum support for Testbench Core v9.2.0+. (v9.1.3...v9.2.0)
- Added new attributes:
Orchestra\Testbench\Attributes\ResolvesLaravel
Orchestra\Testbench\Attributes\UsesFrameworkConfiguration
- Allows to discover
factories
using Workbench to mapWorkbench\App\Models
toWorkbench\Database\Factories
classes. - Allows to auto discover console command classes from
workbench/app/Console/Commands
.
- Bump minimum support to Laravel Framework v11.11.
- Implements
JsonSerializable
toOrchestra\Testbench\Foundation\UndefinedValue
. - Update skeleton to use
workbench
as default environment value. - Allow
Orchestra\Testbench\Attributes\Define
andOrchestra\Testbench\Attributes\DefineEnvironment
to be used on the class level by @danjohnson95
- Ensure
usesTestingFeature()
attribute registration is loaded before class attributes instead of method attributes.
Released: 2024-06-04
- Update minimum support for Testbench Core v9.1.3+. (v9.1.2...v9.1.3)
- Fixes
Orchestra\Testbench\Workench\Workbench::applicationExceptionHandler()
usage to detectWorkbench\App\Exceptions\Handler
class. - Fixes
Orchestra\Testbench\Console\Kernel
andOrchestra\Testbench\Foundation\Console\Kernel
unable to discover commands.
Released: 2024-06-01
- Update minimum support for Testbench Core v9.1.2+. (v9.1.0...v9.1.2)
- Utilise
Orchestra\Testbench\package_path()
function instead ofTESTBENCH_WORKING_PATH
constant. - Update configuration to match Laravel Framework v11.8.0,
- Fixes
Orchestra\Testbench\Attributes\RequiresLaravel
attribute usage.
Released: 2024-05-21
- Update minimum support for Testbench Core v9.1.0+. (v9.0.13...v9.1.0)
- Uses
TESTBENCH_WORKING_PATH
from environment variable before fallback togetcwd()
. - PHPStan Improvements.
- Add support for PHPUnit 11.1.
- Update skeleton to match v11.0.7.
- Fixes routing registration using macro with Workbench.
Released: 2024-04-16
- Update minimum support for Testbench Core v9.0.13+. (v9.0.9...v9.0.13)
- Allows
Orchestra\Testbench\remote
to accept$env
with eitherarray
orstring
. - Includes
TESTBENCH_PACKAGE_REMOTE=true
when running command usingOrchestra\Testbench\remote
. - Flush Static Improvements.
- Revert setting
workbench
environment variable when Testbench CLI is used outside of testing.
- Fixes
serve
command. - Fixes
runningInUnitTests()
returningtrue
when not running tests via Testbench CLI.
Released: 2024-03-27
- Update minimum support for Testbench Core v9.0.9+. (v9.0.7...v9.0.9)
- Update minimum support for Laravel Framework
11.1.0
.
- Add support for
HASH_VERIFY
environment variables.
- Force reset
RefreshDatabaseState
when usingLazilyRefreshDatabase
with SQLite:in-memory:
database connections.
Released: 2024-03-25
- Update minimum support for Testbench Core v9.0.7+. (v9.0.6...v9.0.7)
- Fixes
RefreshDatabase
to be executed ontearDown()
only limited when ad-hoc migrations was added during test.
Released: 2024-03-19
- Update minimum support for Testbench Core v9.0.6+. (v9.0.1...v9.0.6)
- Run
ResetRefreshDatabaseState
viatearDownTheTestEnvironmentUsingTestCase()
method. - Check against
RefreshDatabaseState::$migrated
andRefreshDatabaseState::$lazilyRefreshed
before loading migration paths to the instance ofmigrator
. - Update skeleton to match v11.0.3.
- Revert default skeleton database collations to
utf8mb4_unicode_ci
.
- Fixes
beforeApplicationDestroyed()
usage onloadLaravelMigrations()
method. - Fixes
RefreshDatabase
usage does not reset the database migrations between tests. - Fixes
class_implements()
should only be executed if the Attribute class exists. - Testbench CLI should prioritize application kernels defined via
bootstrap/app.php
when configured using a custom skeleton.
Released: 2024-03-13
- Added support for PHPUnit 11.
- Update support for Laravel Framework v11.
- Increase minimum PHP version to 8.2 and above (tested with 8.2 and 8.3).
- Deprecate
Orchestra\Testbench\Concerns\HandlesAnnotations
in line with PHPUnit removal support for meta-comment support using annotation.
- Remove deprecated
Orchestra\Testbench\Concerns\Database\HandlesConnections
trait. - Removed deprecated
create-sqlite-db
anddrop-sqlite-db
standalone commands.