pestphp/drift
Pest Drift is a Pest plugin for Laravel that detects database schema drift. It compares your migrations with the live database so tests fail when schema changes happen outside migrations, helping keep environments consistent and deployments predictable.
Architecture fit. pestphp/drift is a development-time codemod — "drifting you to Pest" — that rewrites PHPUnit class-based test files into Pest's functional syntax. It is not a runtime dependency, not middleware, not a service provider on the request path. From a blast-radius standpoint this is the safest category of package that exists: it cannot reach production, cannot touch customer data, and any defect is confined to the test suite and CI. That is the entire case in its favor. Everything else in the signal set is negative: 29 stars, zero dependents, archived upstream, last release 2020-09-11, composite score ~1.17.
There is also a documentation defect that must be resolved before any engineering time is spent. The indexed package blurb describes snapshot testing (expect()->toMatchSnapshot(), --update-snapshots, baseline accept/reject, CI-friendly exit codes), while the repository name, release notes, and developer assessment describe a PHPUnit→Pest migration tool. These are two different products. Mismatched marketing is itself a maintenance-quality signal, and it means the first diligence question is simply: what does this package actually do? Until answered, any evaluation is evaluating a guess.
Integration feasibility. Nominally a require-dev line plus a console invocation against a target directory. In practice the 2020 vintage is the binding constraint. The package targets the PHP 7.2/7.3 and Laravel 6/7 era; a modern PHP 8.2+/Laravel 10+ application will likely fail Composer resolution without constraint overrides or a fork. Zero dependents is a meaningful negative signal here — there is no public evidence of anyone running this successfully against a contemporary codebase, which means your spike is the first field test, not a validation of known-good behavior.
Technical risk, in descending order of severity:
@depends annotation, a setUp/tearDown lifecycle hook, a trait-based fixture, or an exception expectation can produce tests that pass while asserting less than the originals. Green CI is not evidence of correctness — it is evidence the tests ran. This is the risk that should drive the decision, because it is invisible by construction and it corrupts the artifact the team relies on to ship safely.composer audit, Dependabot, Snyk) will flag it and generate recurring dependency-review noise for as long as it sits in composer.json.Key questions.
@depends, abstract base test classes, custom assertions, mocking-heavy tests? High-complexity suites should not go through an unmaintained codemod.Stack fit. Composer require-dev, PHP/Laravel only — no database, queue, or infrastructure touchpoints. It fits the stack in the narrow sense that it is installable in principle. It does not fit in the sense that matters: resolving against a currently supported PHP and framework version. Scope the work assuming a Composer-resolution fight precedes the first converted test.
Migration path. Do not install it as a durable dev dependency. The only defensible pattern is a time-boxed, throwaway spike:
main.If a maintained successor exists, run the same spike on two tools in parallel. At this scale, comparison is cheaper than commitment.
Compatibility. Assume incompatibility until proven. Pin to a specific commit if a fork is used; the last tag is 2020 and will not track PHP minor-version changes. Pest 2.x/3.x-era APIs are almost certainly outside what this tool emits, meaning the output may not even be idiomatic for the framework you are migrating to. Keep phpunit.xml and the PHPUnit binary intact throughout so both suites can run in parallel for parity evidence.
Sequencing. This belongs at the front of a Pest migration, behind a go/no-go on the migration itself, and before any test-suite restructuring. It must not run alongside a Laravel or PHP upgrade — stacking a framework upgrade and a test-framework codemod in one window makes failures unattributable and turns debugging into archaeology. If the migration is not already funded and staffed, close the evaluation here; do not let a tooling spike become the tail that wags the migration dog.
Maintenance. Upstream maintenance is zero by definition. Any real use implies a fork or vendored copy under team ownership. A small codemod is tractable to fork — days, not weeks — but it is permanent work in service of a one-time transformation. That is a bad ownership trade: indefinite obligation, finite value. The correct posture is consume-once-and-discard.
Support. None. No issue triage, no security response, no compatibility patches. The saving grace is that a dev-only tool cannot expose production attack surface; the cost is confined to CI reliability and scanner noise. For a TPM that means the burden lands on your own on-call and platform engineers, not on any vendor or upstream maintainer. Budget it as an internal support line, not a free dependency.
Scaling. Not a scaling concern in the conventional sense — it does not run in production or per-request once migration completes. Its only "scale" is the size of the suite it chews through, once. The scaling question that actually matters is review capacity: N converted files require N reviews, and that cost grows linearly with suite size regardless of tool quality. Budget review as a first-class line item, because under-resourcing it is precisely what converts this from a convenience into a correctness incident.
Failure modes.
composer.json.Ramp-up. Low for a TPM to reason about, moderate for engineers to execute honestly — the tool itself is trivial to invoke, but the discipline of reviewing every diff and running dual suites is the actual work. A two-day spike with named engineering capacity is the right envelope: day one for resolution and a first conversion pass, day two for hand-review and measurement.
Recommendation. Treat pestphp/drift as a historical reference, not a dependency. It has no product surface unless a PHPUnit→Pest migration is already funded. Resolve the description conflict, then run a two-day throwaway spike comparing Drift against today's maintained codemod options on one representative directory. Fund the migration decision first; fund this tool never.
How can I help you explore Laravel packages today?