Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Playwright Laravel Package

saucebase/laravel-playwright

Integrate Playwright browser testing into Laravel applications with ease. This package provides helpers, configuration, and test utilities for running end-to-end browser tests against your app, streamlining UI testing within your existing PHP workflow.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package follows a sidecar-bridge pattern: a Laravel-side surface (routes/service provider registered only in local/testing) that the Node/Playwright process calls over HTTP to create factory records, run artisan commands, query the database, and control the clock. This is the right shape for a Laravel app. It avoids Selenium/ChromeDriver, reuses the app's own PHP runtime for state setup, and lets the browser layer stay pure Playwright. Prior art (Cypress-for-Laravel style bridges, Pest browser testing) confirms the pattern is viable; the differentiator here is the bundled ergonomics — factories, DB queries, artisan, and time travel as first-class test primitives rather than hand-rolled HTTP calls.

Where the value actually is. Raw Playwright is weak at exactly the things Laravel teams need: deterministic seeding, asserting persisted state, triggering queued/scheduled work, and freezing time so date-sensitive UI is stable. Time travel in particular is a capability Dusk handles awkwardly and plain Playwright cannot do at all. That is the strongest argument for the package, not the browser automation itself.

What v1.1.0 changes. The release is a single line — "Upgrade to Laravel 13" (PR #11) — with no migration notes, no deprecation statement, and no compatibility matrix in the notes. Two things follow from that:

  1. The project is alive. The compare link shows a v1.0.3 tag, so the earlier read of "a single release" was already stale; there is now a patch line plus a minor bump. That materially softens — but does not eliminate — the abandonment concern.
  2. The compatibility window is now ambiguous and possibly narrower than assumed. A bridge package that touches factory resolution, container bindings, and Carbon::setTestNow cannot support a framework major for free. "Upgrade to Laravel 13" may mean added support (10/11/12/13) or moved to Laravel 13 (10/11 dropped). The notes do not say, and that distinction determines whether this is a low-risk minor or a forced-upgrade coupling. Treat it as unresolved until the CI matrix is inspected.

Integration feasibility. Low effort to spike: composer dev dependency, an npm/TS companion, a base URL, and a running app server in CI. A single critical journey (auth + one write path) can be validated in a day or two by one engineer. No schema changes, no production runtime dependency. The one new precondition is version alignment: our app's Laravel line must fall inside whatever v1.1.0 actually supports, and both the composer and npm sides must be pinned together.

Technical risk. Maturity remains the dominant risk rather than architecture, but the profile has shifted. Still true: zero dependents, low stars, mid-band opportunity score, and a contributor base that reads as single-maintainer. Newly relevant:

  • Version-support ambiguity (new). Without a published support matrix, we cannot tell whether adopting v1.1.0 pins us to Laravel 13 or is additive. Adopting a dev-only E2E dependency that tracks the newest framework major forces our upgrade cadence to match the maintainer's, not ours.
  • Thin release hygiene. A framework-major bump shipped with a one-line changelog and no breaking-change callout is itself a signal about release discipline. It does not mean the code is wrong; it means we should read the diff and the CI config rather than the notes.
  • Security surface. Endpoints that create records and execute artisan commands are effectively remote code execution if reachable outside test environments. Unchanged by this release, still the highest-severity item, still must be reviewed before any pilot.
  • Framework coupling. Factory resolution, container bindings, and Carbon::setTestNow are internals-adjacent. The v1.1.0 bump is evidence the maintainer keeps up, but also evidence that a framework major requires a package release — so there is always a window after each Laravel major where this package is behind.
  • Cross-boundary state. Database transactions cannot span the Playwright/HTTP boundary, so isolation depends on truncation or per-worker databases.
  • Time-travel scope. If the clock override is global rather than per-request, one test can poison subsequent ones.

Key questions to answer before committing:

  1. How is the bridge gated — environment check, middleware, signed token, or nothing? Can it be proven inert in staging/prod?
  2. Which Laravel and PHP versions does v1.1.0 actually support, and were 10/11/12 dropped? What does the CI matrix cover, and is the previous minor (v1.0.x) still receiving patches?
  3. Did PR #11 change the bridge's public surface (route names, payload shapes, artisan/clock semantics), or only dependency constraints? Read the diff, not the notes.
  4. Is time travel per-request or process-global, and how is it reset between tests?
  5. Does it support Playwright parallel workers with per-worker database isolation?
  6. What is the maintainer's release, deprecation, and backward-compatibility policy, and what is the bus factor?
  7. How does it compare, for our specific test cases, against Pest 4 browser testing or a ~200-line in-house bridge?
  8. MIT license is fine, but do we need the right and ability to vendor/fork — and does the Laravel 13 jump make a fork more or less likely?

Integration Approach

Stack fit. Targets a Laravel application with Node 20+ and current Playwright. The supported Laravel range is now the gating question rather than a footnote: if v1.1.0 is Laravel 13-only, this package is only viable for teams already on 13 or planning to be within the pilot window; if it is additive across 10–13, it fits the standard stack as previously assessed. It fits best where a Playwright or Cypress practice already exists — typically because the front end is JS/TS — or where QA engineers write TypeScript rather than PHP. In a PHP-only test culture with no Node tooling, the adoption cost rises materially.

Positioning against alternatives. Do not frame this as a replacement for PHPUnit/Pest feature tests; those stay. It is not a like-for-like Dusk swap either — Dusk is first-party and stable, this is not. The realistic pitch is unchanged: "the glue that makes Playwright viable for Laravel E2E," adopted incrementally for new tests. v1.1.0 improves the pitch slightly on liveness and weakens it slightly on predictability.

Migration path.

  1. Confirm the support matrix first — read composer.json and the CI workflow on the v1.1.0 tag before writing any code. This now precedes the spike.
  2. Spike on a throwaway branch: one login flow, one write flow, one time-sensitive screen, on our actual Laravel version.
  3. Harden the bridge configuration and confirm it cannot be enabled outside test environments.
  4. CI job with app server, database, and browser; measure wall-clock and flake rate.
  5. Standardize for new E2E tests in one product area only.
  6. Backfill only existing tests that are flaky or expensive under Dusk — never rewrite green tests for their own sake.
  7. Retire the old suite as coverage is replaced, on a quarterly cadence.

Compatibility work. Pin exact versions of both the composer and npm sides and upgrade them together — this is now non-negotiable, since the package's version numbers and Laravel's are coupled by design. Verify behavior under the specific database driver in use (transactional truncation behaves differently on MySQL vs Postgres vs SQLite), and under the queue, session, cache, and mail drivers configured for the test environment. Artisan commands invoked through the bridge inherit whatever side effects those drivers produce. Keep a record of which package version we validated against which Laravel/PHP/Node combination; it is our only support matrix until upstream publishes one.

Sequencing. Support-matrix verification and security gating are blocking prerequisites, not parallel tasks. Parallelization is last — get correctness on a single worker first, because flaky isolation will otherwise be indistinguishable from bridge bugs.

Operational Impact

Maintenance. A dev-only dependency with an outsized ownership tail. Budget one to two days per quarter for version bumps and compatibility fixes, plus a named owner in test infrastructure — and expect that estimate to spike in the quarter after each Laravel major, when this package ships its matching release and we must validate it. Because upstream is small, assume you may eventually fork; keep any local patches as a thin wrapper rather than edits to vendor code so a fork stays cheap.

Support and knowledge spread. The bridge is invisible infrastructure — a well-meaning "unused route" cleanup in the app can silently break the entire E2E suite. Document it in the app's testing README and add a code comment at the route registration. QA owns day-to-day usage; application engineers need only awareness, not expertise.

Scaling. Each Playwright worker needs an isolated database (N databases, or schema-per-worker plus a reset hook). App boot cost per worker and browser startup dominate CI time; expect CI minutes to rise even as test reliability improves. Time-travel and factory state must reset on every test boundary or parallel runs will interfere.

Failure modes, ranked by severity.

  • Critical: bridge routes reachable in staging/production — data tampering and command execution.
  • High: global clock override leaking across tests, producing order-dependent failures that look like flake.
  • High (new): silent support-window mismatch — our app on Laravel 11/12 while the pinned bridge version targets 13, where the bridge no-ops or partially fails and tests pass without exercising the intended path. Pin and assert the package version in CI.
  • Medium: factory records colliding under parallel workers; artisan commands triggering real queues/mail; version skew between the composer and npm halves of the package.
  • Low: network flake between the Node runner and the app server; stale database snapshots.

Ramp-up. A TypeScript-fluent QA engineer is productive in two to three days; the bridge API is small. A PHP-only engineer needs about a week for Playwright fundamentals — locators, auto-waiting, fixtures, trace viewer — which is the real cost, not this package.

Recommendation. Conditional pilot, unchanged in direction but with a revised first gate. v1.1.0 is a net positive signal — the project is maintained, has a patch line, and keeps pace with framework majors — and it should be read as evidence against the "likely abandoned" hypothesis. It does not clear the bar on its own: the release is a one-line note on a change that can break the bridge's coupling points, and it leaves the supported Laravel range unspecified. Promote to team standard only if four gates clear: (a) the v1.1.0 diff and CI matrix are reviewed and our Laravel/PHP versions are confirmed supported, (b) security gating reviewed and proven inert outside test envs, (c) 20+ tests green and stable for four consecutive weeks in CI, (d) a documented ownership and fork contingency exists. If (a) fails — i.e. we are on a Laravel line v1.1.0 no longer covers — fall back to the v1.0.x line if it is still patched, or to Pest 4 browser testing / a minimal in-house bridge, which is likely cheaper than carrying a dependency that dictates our framework upgrade cadence.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast