Repository navigation
Releases
v0.9.2 — Laravel cleanup and parallel testing guide
Laratesto 0.9.2 skips unloaded Laravel classes during static state cleanup after a test. The README shows how to run multiple Testo processes with isolated working directories, temporary storage and JUnit reports.
Parallel testing guide · Benchmark against 0.9.1 · Full changelog
v0.9.1 — Testo and Rector compatibility
Laratesto 0.9.1 updates Testo and restores compatibility with the latest Rector bridge.
Changed
- Require Testo
^0.10.60and update the bundled skill references and consumer fixtures. - Update the development migration dependencies to
testo/bridge-rector0.3.6 andichinya/laratesto-rector0.2.3.
Fixed
- Let Rector recognize inherited PHPUnit assertion methods through the compatibility shim, including calls such as
parent::assertTrue(). - Restore Laravel's PHP error and exception handlers when disposing of an application.
- Report each Laravel cleanup diagnostic once in Testo's test result.
The Unit, Laravel and Rector suites passed after a clean locked install on Linux with PHP 8.4. 671 tests passed and nine were skipped.
v0.9.0 — HTTP client and diagnostic channels
Laratesto now provides a typed HTTP client for tests without a base class or trait, optional SQL/application log channels, and clearer Laravel assertion stack traces.
Added
- Use
Laratesto::http()orapp(HttpClient::class)inside a Testo execution withLaravelPlugin. The client shares request state with existing helpers and is revoked after the execution ends. Retry and Repeat get fresh clients. - Enable
captureSqlandcaptureLogsinLaravelConfigto capture diagnostics in Testo'ssqlandlaravelchannels. SQL bindings and log context stay excluded unless explicitly enabled. - Document the HTTP API decision, execution lifecycle and runnable examples for the base class, trait and standalone functions.
Fixed
- Mark Laravel assertion methods with Testo's
AssertMethodattribute so failures point to the assertion call site, including failures from real PHPUnit.
Validation
- Required CI suites and Line coverage checks passed on PHP 8.3–8.5 for the release commit.
- Documentation examples passed on PHP 8.3.35, 8.4.26 and 8.5.11: seven tests and ten assertions per runtime.
- English/Russian documentation site build and Composer validation passed.
- The experimental PHP 8.6 job remains outside the release gates: locked
nette/schemadoes not yet allow that runtime, so tests do not start there.
Full changelog: v0.8.3...v0.9.0
v0.8.3 — Laravel helper discovery fix
Fix class-level #[Test] discovery for Laravel tests using LaravelTestCase or InteractsWithLaravel.
- Exclude bridge helper implementations, including trait aliases, while preserving user overrides, inherited user tests and unrelated methods with matching names.
- Add a native CLI regression and update the README and bundled Agent Skills.
- The published English/Russian Testo examples can use class-level attributes as intended. Dependencies and the PHP >=8.3 requirement are unchanged.
Validation:
- PR #33 CI passes the required PHP 8.3, 8.4, 8.5 and real coverage jobs. GitGuardian also passes.
- Local PHP 8.3.35: Unit 108 tests / 863 assertions (106 passed, 2 skipped); Laravel 120 tests / 429 assertions (119 passed, 1 skipped).
- Local PHP 8.5.11: Rector 435 tests / 4281 assertions (433 passed, 2 skipped).
- Source-checkout documentation examples pass for both languages on PHP 8.3.35, 8.4.26 and 8.5.11: 3 tests / 4 assertions per run, without PHPUnit.
- Experimental PHP 8.6 remains non-blocking: the existing locked
nette/schemadependency caps PHP at 8.5.
The release commit only dates the changelog; runtime, tests and dependencies match the tested PR.
Full changes: v0.8.2...v0.8.3
Published-package verification:
- A fresh Laravel 13.11.0 skeleton installed
ichinya/laratesto:0.8.3from Packagist using its ZIP distribution, without custom/path repositories, local source substitution, platform overrides or PHPUnit. - The resolved consumer uses Laravel 13.37.0 and Testo 0.10.56. The installed source/dist reference is
01fe04b96990ef629e837c141cd6c25dc23e722band Laravel package discovery succeeds. - Unchanged PHP examples from the published English and Russian Testo guides (docs commit
16ad7171e4db436adeed8ed03b4fab8d8580c5ab) pass on PHP 8.3.35, 8.4.26 and 8.5.11: six runs, each with 3 passed tests / 4 assertions, zero skips or helper cases. - Consumer Composer validation and actual platform checks pass on all three PHP runtimes.
- Post-merge CI for the release commit also passes PHP 8.3, 8.4, 8.5 and required real coverage. PHP 8.6 retains the existing non-blocking dependency constraint failure.
v0.8.2
Laratesto now requires Testo ^0.10.56 and ships the Laravel agent skills and lifecycle fixes previously merged into main.
- Update the root and optional PBT locks to Testo 0.10.56 / Codecov 0.2.5; use released laratesto-rector 0.2.1.
- Make the skills consumer reproducible with a committed PHP 8.3 lock, Composer download caching, streamed installation output and bounded timeout diagnostics. The archive verifier also passes with network disabled after its dependencies are cached.
- Verify native FinderConfig exclusion/inclusion and keyword-name discovery, unloaded/out-of-target coverage and codeCoverageIgnore. Required driver-backed coverage executes two tests and 16 assertions without skips.
- Include three Composer-distributed Laravel skills, archive/sync checks and executable examples from #20.
- Include partial-bootstrap cleanup, rollback recovery and independent SQLite process-crash commit-boundary checks from #19.
PHP 8.3-8.5 / Laravel 13 remain supported. PHP 8.6 is a non-gating platform signal; the locked nette/schema constraint still stops that job before tests.
Changes: #32
0.7.3 — PHPUnit shim fixes for Inertia
What's Changed
Fixed
- PHPUnit compatibility shim: added missing
assertIsArray,assertArrayHasKey,assertNotTrue,assertInstanceOfandassertSameSizeso Laravel testing helpers (includinginertiajs/inertia-laravel) work withoutphpunit/phpunitinstalled (issue #18).
0.7.2 — PHPUnit compatibility shim and Laravel 13 support
What's Changed
Added
- Bundled PHPUnit compatibility shim (issue #12): provides
PHPUnit\Framework\TestCase,Assert,MockObjectstubs and metadata classes whenphpunit/phpunitis not installed. - Canonical Rector autoload path discovery and a Testo Rector runner override via classmap.
- CI runs the self-test suite on a self-hosted runner over Laravel 13 with PHP 8.3–8.5.
Changed
- Breaking: dropped Laravel 12 support; now requires
laravel/framework ^13.0and PHP>=8.3(issue #6). - Bumped
testo/testorequirement to^0.10.45.
Fixed
- Normalized line endings in the PHPUnit migrator input on Windows (PR #15).
- Kept the
DatabaseTruncationprobe free of PHP 8.5 deprecation noise.
Removed
- Removed
phpunit/phpunitfrom rootrequire-dev; the bundled shim replaces it.
0.7.1 — PHPUnit migration and runtime parity
[0.7.1] - 2026-09-08
Fixed
artisan testno longer takes over Collision'stestcommand by default:
the unified runner is always available asartisan laratesto:test, and
replacingtestis opt-in through the publishable
laratesto.replace_test_commandconfig flag.- PHPUnit migration and runtime parity (issue #10, PR #11):
- project bootstrap and initialization semantics are preserved for migrated
suites, including state cleanup between tests; - assertion semantics match PHPUnit and Laravel, including facade
assertions, mailable assertions and exception expectations; - response helpers keep Laravel behavior, including registered response
macros; - stub policies and console output capture follow PHPUnit behavior, with
and without return values; - pending Artisan commands execute at Laravel's deferred timing, and the
Rector rules rewrite them consistently; - conversions without a faithful mechanical translation stay explicit
residuals instead of silently changing behavior.
- project bootstrap and initialization semantics are preserved for migrated
- README documents installing the matching runtime and Rector path packages.
0.7.0 — Rector migration of PHPUnit test suites
[0.7.0] - 2026-09-07
Fixed
- Empty
RefreshDatabaseandDatabaseTruncationconnection selections preserve
process-wide migration state, so a later default refresh still performs its
first migration against an existing schema. composer testdisables Composer's outer process timeout for the test script.LaravelResponse::assertHeader()compares expected values case-insensitively
again, matching Laravel while still rejecting differences beyond case.- Fluent
assertJson()callbacks supportConditionableandMacroable, with
assertion failures preserved. - Nested database transaction scopes restore each connection's previous
transaction manager as well as the application binding, including on cleanup
failure. - Rector migration safety and report handling:
- guarded apply refuses untracked or ignored PHP files in the processed scope
as well as tracked modifications;--allow-dirtyexplicitly bypasses the
Git guard and requires an independent backup; - unreadable source files and generated-config failures produce a friendly
exit1and leave the previous report untouched; - dry-run reconstruction handles zero-count insertion anchors and empty
files, and rejects hunks beyond EOF without PHP warnings; - residual scanning recognizes only whole canonical PHP marker comments,
excluding quoted examples in strings, heredocs and surrounding comment prose; - trait-provided test discovery, source API dependencies and lifecycle hooks
block class conversion with residuals, including Laravel trait-basename
hooks; processed descendants with unsafe traits preserve their shared base; - file/glob, base-rule and required database-rule exclusions cannot leave a
partially converted hierarchy without active database isolation; - inherited database strategies check descendant options, hooks and writes
against the ancestor attribute and preserve the shared source strategy when
equivalence cannot be established; unchanged inherited defaults remain safe; - unsupported
parent::calls receiveHTTP_UNSUPPORTED_SIGNATURE, including
assertions left by the upstream rules and lifecycle calls outside the exact
statement shape the base rule rewrites; - dynamic method names fail the HTTP preflight before signature lookup,
including$this,self::,static::and nullsafe calls; TestResponsestatic factories and unknown/nullable or multi-argument
construction preserve their source type withRESPONSE_UNSUPPORTED_API;
construction with one native-type-proven SymfonyResponsestill converts,
including inferred variables, typed parameters and namedresponse:values;- retained Pending Artisan commands receive a residual across later statements,
loop iterations and catch/finally; the check accounts for Laravel's deferred
execution even after an assertion and preserves immediate chains and terminal
assignments with literal expectations when commands do not escape through
references or static/global storage; - Laravel-like method names on proven unrelated native DTO receivers no longer
produce false residuals; unknown, broad-object and response-capable union
receivers retain conservative markers; - direct application-property writes, references,
isset/unset,
destructuring/foreach targets and arguments passed to unresolved or
by-reference signatures preserve the source class with a residual, while
ordinary reads and proven by-value calls remain convertible; - framework database strategies hidden in project-trait composition stay
visible and residual-marked, including across files and the lazy strategy; - own/inherited Laravel
Seed/Seederattributes lift only with a positively
identified installed Laravel 13 framework, preserving precedence and literal
class names across files; Laravel 12/unknown contexts retain source metadata
with a database residual, as do unsupported metadata shapes; - live constructor-promoted database options on the class, project ancestors and
used traits require manual migration, including when an inherited constructor
can overwrite a child's literal redeclaration; - database option reads through method-local
$thisaliases now participate in
the class/ancestor/composed-trait reader checks, including chained/reference
assignments, closures and conditional/coalescing expressions; unrelated DTO
and unshadowed private-slot controls remain supported; - the truncation contract's inert connection double accepts Laravel 13's
optionalfetchUsingargument on bothselect()andcursor(), while
remaining compatible with Laravel 12.
- guarded apply refuses untracked or ignored PHP files in the processed scope
- The ancestor-static database option probe is now discovered and checks the
actual PHP read result instead of remaining an unexecuted contract. - Migration documentation scopes database hook blockers to the selected
strategy and explains report preservation, partial apply, rollback limits and
per-connection migration/seeding for hand-written truncation attributes. - Rector migration of Laravel PHPUnit test suites (PR #8 fix plan):
- the project base
Tests\TestCaseis converted exactly once — it keeps its
custom helpers and setup, and every descendant keeps extending it while
gaining only lifecycle, HTTP and database conversions; - descendant safety is proven across the whole extends chain (resolvable,
inside the processed paths, free of blockers, terminating at the framework
base or an already-migrated base); anything unprovable fails closed with a
CLASS_UNSAFE_HIERARCHYresidual instead of a half-migrated hierarchy; - rule configuration is deterministic: re-configuring the shared rule
instance can no longer leak a previousbase_classes/target_mode; - one configured hierarchy state: a
base_classesoverride governs every
Laravel rule at once (base class, database traits, HTTP calls, residual
detection) through the sharedConfiguredHierarchyservice, so a base
dropped by the override can no longer be partially mutated by a rule that
still recognized a hard-coded default, and unknown configuration keys are
rejected as documented; - multi-property database options split losslessly — sibling properties on
the same declaration survive; - database option properties supplied by non-Laravel project traits stay
visible: traits flatten their composition tree into every consuming class,
so a directly or ancestor-used trait carrying$seed,$tablesToTruncate
and friends is live for the trait machinery even though a class-level scan
never sees it — the preflight now resolves used traits (same-file first,
then reflection) with their full composition trees for the class and the
applicable ancestor chain and fails the conversion closed with
DATABASE_UNSUPPORTED_CONFIGURATION; an unresolvable used trait blocks as
well, while static members and ancestor-private members (invisible to the
descendant) and trait uses of nested class-likes are correctly inert; - a database trait re-declared on a descendant of a class that already uses
the same trait no longer produces a second class attribute (Laravel's
class_uses_recursivehad collapsed the duplication to one behavior, while
Testo's hierarchy-wide reflection then ran the interceptor twice): the
duplicate merges into the ancestor's single attribute when the effective
option configuration is provably identical — same names and literal values,
or nothing on both sides — including across files, through intermediate
project bases and against an ancestor that already carries the migrated
attribute; a diverging configuration fails closed with an actionable
DATABASE_UNSUPPORTED_CONFIGURATIONresidual, and different database
traits keep stacking; - ancestor option properties shadowed by the converted class no longer block
the database trait conversion: the Laravel traits read their options through
property_exists($this, ...)plus$this->option, and PHP resolves both to
the most-derived declaration, so when the class itself declares the option
with a supported literal only that value was ever live — the conversion now
lifts it into the attribute and ignores same-named ancestor declarations at
every chain depth, while an ancestor option the class does not redeclare
still fails the conversion closed; - a project reader above the converting class bounds that relaxation: while
the class's own shadowing declaration is the value an ancestor method, an
ancestor trait method or one of the class's own project trait methods
observes, removing it silently repoints those reads at whatever the
hierarchy resolves next. The lift now fails closed with an actionable
DATABASE_UNSUPPORTED_CONFIGURATIONresidual for any live reader, except
the proven inert shape where the reader's own scope declares the option
privately (a more-derived redeclare never shadows that private slot, so it
answers identically before and after the lift); statically named instance
reads count, dynamic property names fail closed, and a same-value inherited
literal still receives a stable residual instead of a value-proof engine; - residual markers reconcile: changed constructs refresh their reason and
unchanged runs stay byte-identical; remove resolved markers together with
the manual fix, because markers left in source remain reportable; - a file-level response-gate block no longer strands an otherwise convertible
class: when an unsafe sibling blocks the file-wideTestResponseswap, the
safe class is marked with aRESPONSE_UNSUPPORTED_APIresidual naming the
blocker instead of silently keeping `...
- the project base
0.6.9 — PHPUnit migration and unified test runner
Highlights
- Adds a conservative
php artisan laratesto:migrate-phpunitcommand with dry-run, conflict protection, and opt-in source removal. - Adds a unified
php artisan testcommand that runs Testo first, then Pest or PHPUnit when installed, without duplicating Pest's PHPUnit-backed suite. - Expands Laravel lifecycle, database migration, HTTP, session, view, time-travel, and Artisan assertion compatibility for migrated tests.
Verification
- Testo: 83 passed, 1 skipped, 273 assertions.
- PHP lint: 66 files passed.
- Composer validation and locked dependency audit passed.