pestphp/dust
A Pest PHP plugin that surfaces code gathering dust, flagging unused classes, methods, and other dead code in your Laravel or PHP project so you can safely clean it up right from your test suite.
Resolve the artefact-identity conflict first — it is a gating step, not a footnote. The repository description, feature list ("Pest plugin for Laravel Dusk", "Dusk browser macros, assertions, screenshots"), and tagline all agree: pestphp/dust is a Pest↔Dusk test-syntax bridge. Prior write-ups in this pack that describe a dead-code scanner are built on the wrong premise and must be formally retired; none of their conclusions should feed this decision. A 30-minute source check (composer.json, src/, tests/) confirms or kills the premise before any money is spent. Everything below assumes the browser-testing interpretation.
Architecture fit. Narrow, non-invasive, and best framed as a standardization decision rather than a platform investment:
composer.json, one Pest config entry, and CI config.Integration feasibility. Mechanically cheap, operationally non-trivial:
composer require --dev plus a config stanza, under a day to a first green test..env.dusk.*) must be learned regardless. The plugin changes how the test class is declared; it does not remove that curve.Technical risk — high, driven by lifecycle status, not capability.
Key questions for the team.
Recommendation: reject for new adoption. It buys syntax consistency and nothing else, and charges an unmaintained-dependency premium for it. If already in the codebase, treat it as a migration candidate with a documented exit, not a component to build on.
Stack fit. Standard Laravel + Pest + Composer + GitHub Actions/GitLab CI, plus a containerized Chrome service. Acceptable only where Pest is the mandated runner and Dusk is the established E2E tool, and where Dusk page objects/components already exist — in that case the work is integration, not rewrite.
Migration path — run this as an evaluation, not an adoption.
composer require --dev on a throwaway branch, get one trivial Dusk test green locally.waitFor, database migrations) that needed workarounds. Page-object compatibility is claimed — verify it.Compatibility.
composer.json.Sequencing.
Maintenance. This is the dominant cost and it lands on the adopting team, permanently. No upstream fixes, no version-bump PRs, no security triage from the maintainer. Realistically budget a few engineer-hours per quarter for dependency drift plus an unbounded patch when a Pest or Laravel major lands. That is the true price of the syntax convenience, and it should be stated explicitly in the go/no-go memo. Compare it honestly against the alternative — vanilla Dusk in PHPUnit style, which is maintained and costs only stylistic inconsistency.
Support. No support channel. No issue corpus, no community answers at 13 stars and 0 dependents, no vendor relationship. Every non-obvious problem is original research by the owning engineer. That is tolerable for one engineer on one module; it is not tolerable as shared infrastructure that other teams depend on, because the knowledge concentrates in one person and becomes a bus-factor risk.
Scaling. Scales poorly and in a specific way: linearly in CI minutes and super-linearly in flake. Each browser test costs a full browser session; parallelism requires Dusk's own parallel infrastructure plus multiple Chrome containers, which the plugin neither provides nor improves. Concurrency, cross-browser matrices, network interception, video/trace artifacts, and visual regression are all outside its scope. Practical ceiling for this approach: a small-to-medium Laravel product with ~10–30 critical-path browser tests. Beyond that, the correct move is a maintained browser-automation tool, not more investment here.
Failure modes — plan for each explicitly.
@group-excluded or commented out; the suite stays green and delivers nothing. Mitigation: report-only mode with a visible flake-rate metric, and an alert when the browser suite's runtime or skip rate moves..env.dusk.*, test database, seeded fixtures, mail/queue fakes diverge from the app. Mitigation: treat Dusk env files as reviewed config, version them, and cover them with the same review discipline as app config.Ramp-up. Two distinct curves. The mechanical one is short: a Pest-fluent engineer writes their first Dusk-in-Pest test in under a day. The effective one is long: stable selectors, explicit waits over sleeps, page-object structure, database/session isolation, and artifact-driven debugging typically take weeks to stabilize — and this is where the schedule actually slips. The plugin flattens none of that curve; it only changes how tests are declared. Onboarding new engineers to a single testing idiom (Pest everywhere) is a genuine, modest win, and it is the strongest argument in the package's favour.
Bottom line for the TPM. Frame this as a one-week, timeboxed, report-only spike on one module, with a written go/no-go based on measured flake rate and porting hours, and a documented exit — named owner, pinned version, and explicit abandonment triggers — agreed before merge. Do not let it become core CI infrastructure, and do not adopt it for new production work without a maintained-alternative review first.
How can I help you explore Laravel packages today?