- What is ralphjsmit/pest-plugin-livewire and what does it do?
- It is a dev-only Pest plugin that brings Livewire component testing into Pest's expressive syntax. It provides helpers for mounting components and chainable assertions for state, events, and rendered output, so Livewire tests stay short and readable. It is a thin DX layer over Livewire's native test primitives and ships no runtime code, routes, or container bindings.
- How do I install ralphjsmit/pest-plugin-livewire in a Laravel project?
- Install it as a dev dependency with composer require --dev ralphjsmit/pest-plugin-livewire. Pest plugin auto-discovery registers it, so there is no service provider to add and no config or migration to publish. Some setups may optionally reference a trait in tests/Pest.php, but the install itself is mechanically trivial. Check your Pest, Livewire, Laravel, and PHP constraints first because the package is archived.
- Which Laravel, Pest, and Livewire versions does ralphjsmit/pest-plugin-livewire support?
- The last release is 2.0 from April 2023, which added Pest v2 support and predates Livewire 3, Pest 3, Laravel 10 and 11, and PHPUnit 10 and 11 internals. Its Composer constraints therefore may not resolve on modern stacks. Treat the published constraints as a starting point and verify installation across your full CI matrix rather than assuming compatibility.
- Is ralphjsmit/pest-plugin-livewire compatible with Livewire 3 and Pest 3?
- Not reliably. Version 2.0 predates Livewire 3 and Pest 3, and the upstream repository is archived, so there are no fixes for Pest plugin API changes, PHPUnit internals, or Livewire 3 semantics. You may hit Composer resolution conflicts, or worse, helpers that still pass while asserting less than expected. Validate behavior in a short spike before relying on it.
- Does Livewire 3 make this Pest plugin redundant?
- Largely yes. Livewire 3 ships fillForm, assertFormSet, assertHasErrors, and assertHasNoFormErrors, which cover most of the form-testing motivation for this plugin. Before adopting it, inventory the helpers it adds and map each one to a native Livewire 3 equivalent or a small local trait method. If nothing is left uncovered, retire it without further analysis.
- Is ralphjsmit/pest-plugin-livewire safe to use in production?
- It is a require-dev package with no runtime code, routes, or container bindings, so its blast radius is confined to CI and developer machines. That means low production exposure, but it is still a supply-chain surface: the package is archived and obscure, which makes it a plausible typosquatting or dependency-confusion target. Verify the Packagist vendor and lockfile hash on any install.
- Is ralphjsmit/pest-plugin-livewire still maintained?
- No. The upstream repository is archived, the last release was 2.0 in April 2023, and there is no issue triage or community validation, with zero stars and zero dependents reported. Adopting it transfers ownership of any fixes to your team. For a long-lived project, that is a strong negative for a standing dependency.
- What are the alternatives to ralphjsmit/pest-plugin-livewire for testing Livewire forms?
- Use Livewire's native Livewire::test() API plus the Livewire 3 form helpers such as fillForm, assertFormSet, assertHasErrors, and assertHasNoFormErrors. You can wrap common patterns in a local Pest trait or custom expectations, and Pest's Laravel plugin covers general application testing. This keeps one assertion vocabulary in your suite instead of two competing idioms.
- Can I fork or vendor ralphjsmit/pest-plugin-livewire instead of depending on it?
- Yes, and for a few hundred lines of helpers that is often cheaper than owning an abandoned dependency. Audit the plugin's src/, copy the helpers you actually use into tests/Support or a local trait, and preserve the MIT attribution. This also avoids Composer conflicts and lets you adapt assertions to Livewire 3 semantics directly.
- Will ralphjsmit/pest-plugin-livewire cause Composer conflicts or false-green tests?
- Both are real risks. Its old constraints can conflict with modern Pest, Livewire, Laravel, PHPUnit, or PHP versions during Composer resolution. More seriously, helpers that pass against drifted Livewire semantics can keep a suite green while asserting less than the team believes, which erodes trust in the whole test suite. Prefer a time-boxed spike or a source-level fork over a standing external dependency.