Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Chrome Laravel Package

chrome-php/chrome

Control headless Chrome from PHP. chrome-php/chrome launches Chromium/Chrome, lets you navigate pages, evaluate JavaScript, take screenshots/PDFs, intercept network events, and automate workflows via the DevTools protocol—ideal for scraping, testing, and rendering.

Deep Wiki
Context7

Product Decisions This Supports

  • Server-Side Rendering (SSR) & Headless Generation: Enable dynamic PDF/screenshot generation for invoices, reports, or marketing assets without relying on frontend frameworks (e.g., replace Node.js-based SSR tools like Puppeteer with a PHP-native solution). Roadmap tie: Accelerate migration from monolithic PHP apps to microservices by offloading rendering to dedicated headless services.

  • Web Scraping & Data Extraction: Replace fragile cURL-based scrapers or third-party APIs (e.g., Scrapy) with a maintainable, PHP-native tool for crawling SPAs or JavaScript-heavy sites (e.g., e-commerce product pages, real-time dashboards). Build vs. buy: Avoid reinventing wheel for CDP integration; leverage this package to reduce dev time by 60%+.

  • Automated Testing: Integrate with PHPUnit or Pest to spin up real browsers for end-to-end (E2E) testing of legacy PHP apps (e.g., WordPress plugins, Laravel admin panels). Use case: Test critical user flows (e.g., checkout, form submissions) in CI/CD pipelines without flaky virtual displays.

  • Legacy System Modernization: Bypass outdated tools like wkhtmltopdf or Selenium bindings for PHP. Example: Generate dynamic PDFs for legacy ERP systems without frontend refactors. Opportunity: Reduce cloud costs by running headless Chrome in-house instead of SaaS scraping services.

  • A/B Testing & Canary Releases: Capture and compare screenshots of different page variants (e.g., UI tweaks) programmatically, feeding results into analytics tools like Google Optimize or custom dashboards.


When to Consider This Package

Adopt when:

  • Your stack is PHP-centric (Laravel, Symfony, WordPress) and you need browser automation without context-switching to Node.js/Python.
  • You require fine-grained control over Chrome/Chromium** (e.g., debugging network requests, waiting for specific DOM states).
  • Performance is critical: Lightweight (~5MB) vs. heavier alternatives like Selenium or Playwright’s PHP ports.
  • You’re building internal tools (e.g., dev tools, monitoring) where open-source MIT license is preferable to proprietary solutions.
  • Your use case involves dynamic content (e.g., SPAs, JavaScript-rendered data) that cURL or DOMDocument can’t handle.

Look elsewhere if:

  • You need multi-browser support (Firefox/Safari): Consider Playwright or Selenium.
  • Your team lacks PHP expertise for debugging CDP interactions; opt for a higher-level tool like Puppeteer (Node.js).
  • You require enterprise support/SLA: This is community-driven; evaluate commercial offerings (e.g., Browserless.io) for production-critical scraping.
  • Your project is resource-constrained: Headless Chrome consumes ~500MB RAM per instance; benchmark against lightweight alternatives like html2canvas for simple screenshots.
  • You’re targeting mobile emulation: This package focuses on desktop Chrome; pair with device-mode flags or consider dedicated mobile automation tools.

How to Pitch It (Stakeholders)

For Executives: "This package lets us automate Chrome/Chromium directly from PHP—enabling cost-effective solutions for PDF generation, web scraping, and testing without vendor lock-in. For example:

  • Replace $5K/year scraping APIs with an open-source tool, saving ~$100K over 5 years for enterprise use cases.
  • Accelerate feature releases by 30% with automated E2E testing in CI/CD, reducing manual QA bottlenecks.
  • Future-proof legacy systems by modernizing rendering pipelines (e.g., dynamic invoices) without frontend refactors. It’s MIT-licensed, framework-agnostic, and maintained by a 2.6K-starred repo—ideal for high-impact, low-risk initiatives."

For Engineering: "This is a drop-in PHP library for Chrome DevTools Protocol (CDP) automation—think Puppeteer but native to PHP. Key advantages:

  • No Node.js dependency: Run headless Chrome directly in your PHP app or microservice.
  • Fine-grained control: Wait for selectors, inject JS, capture screenshots/PDFs, and debug network requests—all via a clean API.
  • Lightweight: ~5MB vs. Selenium’s ~100MB; lower memory overhead than full Selenium grids. Example use cases:
  • Generate PDFs for Laravel admin reports without wkhtmltopdf hacks.
  • Scrape JavaScript-heavy sites (e.g., Airbnb listings) in PHP instead of Python/Node.
  • Automate E2E tests for legacy PHP apps in CI (e.g., WordPress plugins). Downsides: No built-in mobile emulation or multi-browser support—pair with chrome://flags for advanced use cases. Docs are solid but expect some CDP learning curve for complex interactions."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware