v3.0.0-beta1
Puphpeteer v3 replaces the Rialto/Node.js bridge with Puppeteer running inside PHP through QuickJS. Node.js is no longer required at runtime.
Highlights
- Native PHP concurrency with Amp: v3 introduces asynchronous execution through Amp\async(), allowing multiple Puppeteer operations and PHP callbacks to run concurrently without manually starting an event loop. By default all operations automatically awaited, so php code looks the same.
- Reduced CPU and RAM overhead: due to absence of proxy node.js process.
- Broader API support: locators, static methods, writable properties, PHP callbacks and event handlers.
- Plugin support: bundled stealth plugin and build-time registration of custom plugins.
- PHP browser installer: installs the pinned Chrome version into the application's
.chromedirectory, with environment variables for cache paths and skipping downloads. - Docker environments: base and Chrome images, plus Browserless support.
Breaking changes
Requires PHP 8.4+ and the [php-quickjs fork](https://github.com/xtrime-ru/php-quickjs).
Update these imports:
// v2
use Nesk\Puphpeteer\Puppeteer;
use Nesk\Puphpeteer\Resources\Page;
use Nesk\Rialto\Data\JsFunction;
// v3
use Nesk\Puphpeteer\Puppeteer\Puppeteer;
use Nesk\Puphpeteer\Puppeteer\Page;
use Nesk\Puphpeteer\JsFunction;- Legacy
Nesk\Puphpeteer\Resources\…aliases remain available on a best-effort basis. tryCatchwas removed. Methods throw exceptions directly; catchRuntimeException.- Node.js-specific options and
js_extraare rejected. Use plugin configuration instead. JsFunctionnow accepts JavaScript source. Legacy static factories and fluent configuration remain supported.- Browser installation is separate from
launch(). Composer does not automatically execute installation scripts belonging to dependencies.
See the README’s Upgrade from v2 section for migration examples.
Installation
After installing the required PHP extension:
composer require zoon/puphpeteer:3.0.0-beta1
php vendor/bin/console browser:installSkip browser installation when connecting to Browserless or using an existing Chrome executable.
Known limitations
This beta supports Chrome over CDP. Firefox, pipe transport, Node.js writable streams, symbol-based API members and followSymlinks: false are not supported.
Full Changelog: v2.4.3...v3.0.0-beta1