Skip to content
CAI
Software that uses CAICheck a score

spatie/browsershot

62.5

Adequate · 17 November 2026

1.2k

lines of production code

PHP

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added Polling enum for browser waiting strategies

A new Polling enum has been introduced in the Spatie Browsershot library, defining specific constants for browser waiting strategies. This enum exposes 'raf' (RequestAnimationFrame) and 'mutation' options, allowing users to explicitly select how the library waits for page stability during screenshot or PDF generation processes.

spatie/browsershot · high confidence

New structured result object and image manipulation engine

This change introduces the ChromiumResult class to provide structured access to browser outputs such as console messages, request lists, page errors, and redirect history, replacing previous output handling. It also adds the ImageManipulations class, which leverages the spatie/image library (version 3.0.0+) to apply image processing operations to screenshots, ensuring the dependency is present and correctly versioned before execution.

src · high confidence

Removals

Removal of legacy PhantomJS-based Browsershot implementation

The legacy \Browsershot\ class and its associated Laravel service provider have been removed from the codebase. This change eliminates the previous implementation that relied on the PhantomJS binary to capture webpage screenshots, which is no longer supported or maintained.

src/Spatie · high confidence

Behavioural changes

Add specific exception classes for browser and file handling errors

The library now includes dedicated exception classes to provide clearer error reporting for common failure scenarios. Users will see specific exceptions for issues such as empty Chrome output, missing file extensions, non-existent input files, disallowed file:// URLs, remote connection failures, and unsuccessful HTTP responses, replacing generic error messages with context-specific feedback.

src/Exceptions · high confidence

Browser process polyfills ReadableStream and adds output accessors

The browser CLI entry point now polyfills the global \ReadableStream\ from \stream/web\ to ensure compatibility in environments where it is missing. It also introduces new methods to retrieve full output data, including \getOutput\ for accessing request history, console messages, failed requests, redirect history, and page errors, and \pageErrors\ for capturing page-level errors. Additionally, the process now supports reading redirect history and uses base64 encoding for communication between the browser process and the main application.

bin · high confidence

Repository housekeeping and documentation overhaul

This change introduces several non-functional updates to the repository structure and documentation. The CI configuration has been migrated from Travis CI to GitHub Actions, evidenced by the removal of .travis.yml and the addition of GitHub Actions badges in the README. The project's coding standards are now enforced via a new .editorconfig file. Documentation has been significantly expanded in README.md to include installation instructions, code examples for image and PDF generation, and links to the full documentation site. Additionally, the LICENSE file has been renamed to LICENSE.md, copyright holders updated to Spatie bvba, and the phpunit.xml.dist configuration has been added to support the test suite.

(repo-wide) · high confidence

Test coverage

Initial test suite for Browsershot; Removed PhpSpec test suite for Browsershot.

Dependencies

Major dependency overhaul and PHP 8.2+ requirement

The package has been significantly modernized, raising the minimum PHP version to 8.2 and dropping support for older PHP and Laravel versions. It now relies on Symfony Process (6.0–8.0) and Spatie Temporary Directory (2.0) instead of legacy dependencies like Intervention Image and Illuminate Support. The test suite has migrated from PHPSpec to Pest (3.0–4.0), and dev dependencies now include Spatie Image (3.6), Spatie PDF-to-Text, and PHPUnit Snapshot Assertions (5.0). Autoloading has been updated to PSR-4, and the binary distribution for PhantomJS has been removed in favor of headless Chrome via Puppeteer.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 64.4 → 62.5 (-1.9)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 66.7 → 60.5 (-6.2)
  • Architecture 69.0 → 69.0 (0.0)
  • Maturity 59.1 → 58.4 (-0.7)
  • Readiness 68.9 → 68.9 (0.0)
  • Security 67.7 → 67.7 (0.0)
  • Performance 100.0 → 100.0 (0.0)

New (2)

  • Hotspot: bin/browser.cjs (bin/browser.cjs)
  • Off the main sequence: src/Exceptions

Changes since last survey

  • 4 commits — 2 feature/other, 2 fixes

By area

  • docs/usage — 2 commits
  • (repo) — 1 commit
  • (root) — 1 commit

Notable commits

  • fix: Fix dead spatie/image docs link in creating-images.md
  • fix: Merge pull request #990 from fstandhartinger/docs/fix-spatie-image-link
  • change: Block local file requests from supplied HTML by default (#989)
  • change: Update CHANGELOG

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

spatie/browsershot was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 3a09b2b1c8abda32aa0adf2a0896357acecb778e — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.