Symfony Bundle

Route browser requests through Symfony's test kernel, prepare state with application services, and inspect framework evidence in the same test process.

  • Kernel routing Browser requests meet the test kernel
  • Controlled state Prepare fixtures through application services
  • Framework evidence Inspect the response and profiler when needed
Kernel routing

Browser requests meet the test kernel

Requests to configured application hosts are handled inside the PHPUnit process. External requests continue through the browser network.

Kernel and browser lifecycle →
$page = $this->visit('/account');

$this->assertResponseIsSuccessful();
Controlled state

Prepare fixtures through application services

Create the state a scenario needs through Symfony services, then use the browser only for the user-visible workflow.

Fixtures and mocking →
Framework evidence

Inspect the response and profiler when needed

Combine browser-visible assertions with the last Symfony response and profiler collectors when the failure crosses the browser and application boundary.

Profiler and debugging →
Next step

Move from the tour to working code.

Choose the explanation, recipe, or runnable example that matches what you need next.

Common questions

Before you wire it into a suite.

Does the bundle replace the core package?
No. It adds Symfony-aware request handling, setup, and diagnostics around the core Playwright PHP browser API.
Does every Symfony browser test need the bundle?
No. Use the core package against a running server when kernel services and profiler data do not improve the scenario.
Can external requests still use the browser network?
Yes. Configured application hosts are routed through the Symfony kernel; other hosts continue through the browser network.