This release expands npm plugin support, adds Web APIs to the QuickJS runtime, and improves binary transfers, streaming and concurrent PHP callbacks. Puppeteer continues to run inside PHP without a Node.js process.
Highlights
- Application-owned npm plugins: load CommonJS packages directly from your application's
node_modulesthroughJsRuntime::require(). Plugin upgrades no longer require rebuilding Puphpeteer. Includes a runnable stealth + fingerprint example. - Shared JavaScript runtime: loaded packages, custom JavaScript functions and Puppeteer can use the same QuickJS context.
- Expanded Web API support:
URL,URLSearchParams,structuredClone,DOMException,setImmediateandclearImmediate. FixesReferenceError: URL is not defined, including cookie operations. - Streaming UTF-8 decoding: optimized
TextEncoderandTextDecoder, with{stream: true}, correct handling of split characters and a finaldecode()flush. - Modern cancellation APIs:
AbortSignal.reason,throwIfAborted(),abort(),timeout()andany(). - PHP-backed host fetch:
fetch,Headers,RequestandResponse, with streamed response bodies, redirects, cloning and cancellation of underlying PHP I/O. - PHP-backed crypto: secure
crypto.getRandomValues(),randomUUID()andsubtle.digest()for SHA-1, SHA-256, SHA-384 and SHA-512.
Performance and reliability
- Load the bundled JavaScript directly, bypassing unnecessary TypeScript transpilation.
- Transfer filesystem data as native bytes and decode screenshot, PDF and recording payloads in PHP.
- Stream file recordings directly to the PHP filesystem with backpressure, fixing unbounded buffering.
- Fix shared PHP callback lifetimes during concurrent operations.
- Fix zero-delay timer scheduling and improve request cleanup during shutdown.
Breaking changes from beta1
- Requires PHP 8.4+ and php-quickjs >= 0.0.3 from the php-quickjs fork. Use the extension revision pinned in
Dockerfile. - Bundled plugin names and the build-time plugin registry are replaced by application-owned npm packages. Replace
use('stealth')with:
use Nesk\Puphpeteer\JsRuntime;
use Nesk\Puphpeteer\Puppeteer\Puppeteer;
$js = new JsRuntime(moduleRoot: __DIR__);
$stealth = $js->require('puppeteer-extra-plugin-stealth');
$puppeteer = new Puppeteer(runtime: $js);
$puppeteer->use($stealth());
$browser = $puppeteer->launch();Install plugins with npm and include node_modules in deployment. Node.js is not required at runtime.
- Recordings created with
pathwrite directly to disk and return an empty stream afterstop(). Omitpathto consume live video bytes.
Installation
composer require zoon/puphpeteer:3.0.0-beta2
php vendor/bin/console browser:installSkip browser installation when using Browserless or an existing Chrome executable.
Known limitations
npm compatibility covers CommonJS packages and selected Node builtins; ESM-only packages may need a build step.
Host fetch runs independently of Chrome and does not inherit its cookies, proxies or authentication. Streaming uploads and Blob/FormData are unsupported. Encryption, signatures and key management are not implemented.
Only Chrome/Chromium through CDP is supported. Firefox, pipe transport, Node.js writable streams, the legacy screencast() API and followSymlinks: false are unsupported.
Full Changelog: v3.0.0-beta1...v3.0.0-beta2