The decisions behind
Playwright PHP.
Build on Playwright, make its browser model feel natural in PHP, and add integrations that solve work PHP teams face repeatedly.
Start with Playwright.
Playwright already handles the hard browser problems this project needs: Chromium, Firefox, WebKit, browser contexts, locators, waiting, network control, and traces.
The PHP client sends commands to a local Node bridge, which uses Playwright to control the browser. The runtime and browser model stay Playwright's; the public API is implemented and verified for PHP one capability at a time.
// Common concepts translate; signatures still differ
// JS: page.getByRole('button').click()
$page->getByRole('button')->click();
// JS: expect(locator).toBeVisible()
expect($locator)->toBeVisible();Make it feel like PHP.
The API is synchronous, typed, documented, and designed for the tools PHP developers already use.
Public interfaces, strict types, explicit options, behavior tests, and PHPStan level 10 make the library easier to understand and harder to misuse. Semantic versioning and the changelog make compatibility decisions visible before an upgrade.
$context = Playwright::chromium();
$page = $context->newPage();
$page->getByRole('button', ['name' => 'Save'])->click();
expect($page->getByText('Saved'))->toBeVisible();Build for the stack around it.
A browser API is one part of a testing workflow. Companion packages connect Playwright PHP to Symfony, PHPUnit, Mink, GitHub Actions, device profiles, accessibility audits, and performance measurements.
Packages earn their place by removing repeated setup, exposing browser evidence through familiar tools, or making a useful Playwright capability easier to adopt in a PHP project.
playwright
playwright-symfony
playwright-mink
setup-playwright
devices
accessibility
performance