Skip to content

Wire config options into launch and context creation#121

Merged
smnandre merged 1 commit into
playwright-php:mainfrom
smnandre:sa/config-wiring
Jul 23, 2026
Merged

Wire config options into launch and context creation#121
smnandre merged 1 commit into
playwright-php:mainfrom
smnandre:sa/config-wiring

Conversation

@smnandre

Copy link
Copy Markdown
Member

PlaywrightConfig declared channel, proxy, downloadsDir, videosDir and minNodeVersion but nothing read them.

Updates:

  • channel, proxy and downloadsPath through new BrowserBuilder setters, applied in PlaywrightClient::createBrowserBuilder(); an explicit setter call wins over the config;
  • minNodeVersion passed to the NodeBinaryResolver in TransportFactory;
  • videosDir mapped to recordVideo.dir via PlaywrightConfig::toContextOptions() (marked internal), applied both to newContext() and to the default context the server creates at launch

Proxy credentials are sanitized out of the launch log.

The proxy array type requires "server", matching Playwright.

PlaywrightConfig declared channel, proxy, downloadsDir, videosDir and
minNodeVersion but nothing read them. Apply them:

- channel, proxy and downloadsPath through new BrowserBuilder setters,
  applied in PlaywrightClient::createBrowserBuilder(); an explicit setter
  call wins over the config.
- minNodeVersion passed to the NodeBinaryResolver in TransportFactory.
- videosDir mapped to recordVideo.dir via PlaywrightConfig::toContextOptions()
  (@internal), applied both to newContext() and to the default context the
  server creates at launch (the launch command now carries contextOptions).

Proxy credentials are sanitized out of the launch log. The proxy array type
requires "server", matching Playwright.

Covered end to end: video, download and proxy land in the browser; patch
coverage on the changed code is 100%.
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@smnandre
smnandre merged commit 8257548 into playwright-php:main Jul 23, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant