playwright-php/playwright-symfony lets Symfony developers drive a real browser with Playwright while routing requests for configured hosts through the Symfony application kernel in the same PHP process. That gives browser tests a different architecture from Symfony’s established Panther approach—but it does not establish that tests run faster or that one tool is universally better. The bundle is still pre-1.0, so teams should weigh its API-change warning and runtime requirements before adopting it.
What the Symfony Playwright bundle adds
The bundle connects Playwright’s browser automation to Symfony’s test environment. A test can use Playwright’s page API to navigate and interact with a page, while the bundle makes Symfony response assertions and application test context available. Its documentation also describes cookie helpers and access to the latest intercepted request and response.
The distinguishing feature is how requests to configured hosts are handled: Playwright intercepts a browser request, the bundle converts it into a Symfony request, the application kernel processes it, and the resulting Symfony response is returned to the browser. Requests to hosts that are not intercepted continue over the browser’s normal network path. This boundary matters: the integration does not mean every browser request is served by the Symfony kernel.
How to install and configure it
As listed on Packagist and in the package README on October 4, 2026, the requirements are PHP 8.2 or later, Node.js 20 or later, playwright-php/playwright ^1.4, and compatible Symfony BrowserKit, FrameworkBundle, HttpFoundation, and HttpKernel components for Symfony 6.4, 7.x, or 8.x. The listing identifies version 0.10.0, published August 22, 2026, and warns that the public API may change before 1.0. Check the package metadata and README for the version you actually install, since constraints and release status can change. Check the Playwright Symfony package on Packagist.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
- Install the development dependency:
composer require --dev playwright-php/playwright-symfony - Install browser binaries:
vendor/bin/playwright-install --browsers - Register the bundle for tests: add it to
config/bundles.phpwith thetestenvironment enabled, as shown in the README. - Set test configuration if needed: the documented optional file is
config/packages/test/playwright.yaml; it can definebase_urlandintercepted_hosts. - Write a PHPUnit browser test: extend
PlaywrightTestCase, call$this->visit('/'), then use the returned Playwright page API. Run the test with the PHPUnit invocation appropriate to your project and installed package version.
The README documents PLAYWRIGHT_HEADLESS=false to show the browser and PLAYWRIGHT_BROWSER=firefox to select Firefox. Project search documentation also mentions Chromium, Firefox, and WebKit, but confirm the supported engines and installation behavior for the specific bundle and Playwright PHP versions in use rather than assuming every engine is available in every setup.
Where it belongs in a Symfony test strategy
Symfony’s testing guide distinguishes application tests, which exercise behavior through HTTP requests, from other test layers. Its end-to-end guidance describes browser tests for user interaction and JavaScript execution, including capabilities such as screenshots and real-time application scenarios. The new bundle is best understood as another way to implement that browser-facing layer, not as a replacement for unit or application tests. The bundle itself describes browser tests as slower than those lower-level tests and recommends keeping them in a dedicated PHPUnit suite or group.
Rank #2
For browser navigation, the bundle recommends visit() and the Playwright page API rather than direct BrowserKit requests. Keep fast, focused checks at the lower layers; use browser tests for behavior that depends on a real browser, such as JavaScript-driven interactions.
Playwright Symfony bundle and Panther compared
Symfony documents Panther as an end-to-end testing component, while the Panther package describes its browser automation as using the W3C WebDriver protocol. The Playwright Symfony bundle instead exposes the Playwright page API and routes configured-host requests through the Symfony kernel in-process. These are architectural distinctions, not evidence that one option is faster or more reliable.
Quick Recap
Best Value
Rank #4
- Used Book in Good Condition
Rank #3
| Decision point | Playwright Symfony bundle | Symfony Panther |
|---|---|---|
| Request and browser architecture | Configured-host browser requests are intercepted and handled by the Symfony kernel in the same PHP process; other hosts use the ordinary browser network path. (Package documentation: Packagist.) | Symfony describes Panther as a real-browser end-to-end component; its package listing identifies W3C WebDriver-based automation. (Sources: Symfony end-to-end guide and Panther on Packagist.) |
| Browser automation API | Playwright page API. (Package documentation: Packagist.) | WebDriver-based browser automation. (Source: Panther on Packagist.) |
| Symfony test workflow | Explicitly integrates with Symfony concepts including BrowserKit, PHPUnit, kernel handling, and application test context. (Source: Packagist.) | Symfony’s documented option for end-to-end browser testing; whether its workflow fits depends on the team’s existing tests and tooling. (Source: Symfony end-to-end guide.) |
| Runtime setup | Composer, PHP 8.2+, Node.js 20+, compatible Symfony components, and browser installation are reported in the package documentation accessed October 4, 2026. Confirm constraints for the chosen release. (Source: Packagist.) | Symfony’s guide covers browser-driver installation and interactive debugging; the Panther package documents its WebDriver approach. Setup depends on the selected browser and driver. (Sources: Symfony end-to-end guide and Panther on Packagist.) |
| Maturity information established here | The listing identifies v0.10.0 as of October 4, 2026 and warns the API may change before 1.0. (Source: Packagist.) | Comparative maintenance health is not established by the cited documentation; review current release and maintenance information when choosing. |
How to decide whether to adopt it
- Consider the bundle if you want Playwright’s browser API and value having configured-host requests handled by Symfony’s kernel within the same PHP process.
- Consider Panther if its WebDriver-based approach, Symfony’s documented end-to-end workflow, or your team’s existing setup is a better fit.
- Keep the adoption scoped by putting browser tests in a dedicated suite or group, and account for the extra Node.js and browser setup the new bundle documents.
- Review pre-1.0 risk before building extensive test infrastructure around the bundle: its public API may change before 1.0.
- Do not choose on speed claims. The bundle’s project materials describe an optimized shared browser process, but that claim is not an independent comparative benchmark against Panther.
Sources
- Playwright Symfony bundle package documentation and metadata
- Symfony testing guide
- Symfony end-to-end testing guide
- Symfony Panther package listing
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




