Skip to content

Accept launch options in BrowserBuilder::launch() - #204

Open
aik099 wants to merge 2 commits into
playwright-php:mainfrom
aik099:launch-options
Open

aik099 wants to merge 2 commits into
playwright-php:mainfrom
aik099:launch-options

Conversation

@aik099

@aik099 aik099 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #192, following the design from #192 and #200.

launch() now takes array|LaunchOptions:

  • explicit options override the builder settings key by key, so an explicit args replaces the builder's args;
  • array keys go to Playwright unchanged, so options without a builder method (ignoreDefaultArgs, env, timeout, ...) work too;
  • LaunchOptions types the options the builder already has setters for. More can be added when needed.

With wsEndpoint configured, slowMo comes from the merged options as well. The static Playwright::chromium() helpers are unchanged.

Since any env can now reach launch(), the "Launching browser" log entry shows only the env variable names. Sanitizer redacts values by key name, so something like DATABASE_URL=postgres://user:pass@... would otherwise be logged in full.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Accept launch options as an array in BrowserBuilder::launch()

1 participant