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

Global Ray Laravel Package

spatie/global-ray

Install Ray globally to use ray(), rd(), dump() and dd() in any PHP project. Send debug output (arrays, HTML, queries, markdown) to the Ray desktop app, measure performance, and pause execution—same debugging workflow across frameworks and plain PHP.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging & Developer Experience (DX) Roadmap: Accelerate debugging workflows by unifying logging/dumping across all PHP files (not just Laravel) into a single, interactive desktop tool (Ray). Reduces context-switching between CLI, browser, and IDE.
  • Build vs. Buy: Avoid reinventing a custom debugging solution (e.g., logging to files/databases) when this package provides a pre-built, framework-agnostic integration with Ray. Low maintenance cost (MIT license, Spatie-backed).
  • Use Cases:
    • Legacy Codebases: Debug monolithic PHP apps where adding Laravel-specific tools isn’t feasible.
    • Multi-Framework Projects: Standardize debugging syntax (e.g., ray()) across PHP, JavaScript, and Laravel.
    • Performance Profiling: Leverage Ray’s execution pausing and timing features for PHP performance bottlenecks.
    • AI/ML Pipelines: Debug PHP-based AI inference scripts (e.g., PHP-ML) with structured output in Ray.
    • Education/Onboarding: Simplify debugging for junior devs by providing a visual, interactive alternative to var_dump().
  • Tooling Ecosystem: Complements existing Spatie tools (e.g., Laravel packages) for consistency in the tech stack.
  • Cost Efficiency: Free tier (20 messages/session) reduces upfront licensing costs for prototyping; paid licenses scale with usage.

When to Consider This Package

  • Adopt When:

    • Your team uses Ray (or is willing to adopt it) for debugging across languages (PHP, JS, etc.).
    • You need global PHP debugging (not just Laravel) without modifying each project’s composer.json.
    • Debugging spans multiple environments (local, staging, production-like) and requires interactive inspection (e.g., pausing execution, viewing HTML/arrays).
    • You prioritize developer velocity over custom logging solutions (e.g., ELK, Sentry) for early-stage debugging.
    • Your stack includes PHP CLI scripts, Symfony, or non-Laravel frameworks where dd()/dump() lacks interactivity.
  • Look Elsewhere If:

    • Your team doesn’t use Ray and prefers existing tools (e.g., Xdebug, Laravel Telescope, Sentry).
    • You need production-grade logging (this is dev-focused; Ray lacks retention/alerting).
    • Debugging requires structured logging to databases (e.g., for analytics or compliance).
    • Your PHP environment is highly restricted (e.g., shared hosting without global composer installs).
    • You’re debugging performance at scale (consider Blackfire or New Relic instead).

How to Pitch It (Stakeholders)

For Executives/Business Leaders:

"This package lets our devs debug PHP code faster and more intuitively by sending logs/dumps to Ray—a desktop app that works like console.log() but for PHP. Think of it as upgrading from var_dump() to a visual, interactive debugger that works across all our PHP projects, not just Laravel. It’s low-cost (free tier available), reduces debugging friction, and aligns with our existing Spatie tooling. For example, a junior dev could pause execution mid-debug and inspect variables in real-time, cutting troubleshooting time by 30%."

ROI:

  • Time Saved: Faster debugging = quicker feature delivery.
  • Consistency: Standardized debugging across teams/languages.
  • Cost: Pay-as-you-go licensing (free for trials).

For Engineering/Tech Leads:

*"Spatie’s global-ray lets us globally enable Ray debugging across all PHP files—no per-project setup. Key benefits:

  • Unified Debugging: Use ray() anywhere (PHP, JS, Laravel) with the same syntax.
  • Interactive Inspection: Pause execution, inspect queries/arrays, and even view HTML responses—no more CLI context-switching.
  • Performance: Built-in timing and profiling for PHP scripts.
  • Low Overhead: MIT-licensed, Spatie-supported, and works with existing Ray licenses.

Trade-offs:

  • Not a replacement for production logging (use alongside Sentry/ELK).
  • Requires Ray adoption (but free tier mitigates risk).

Proposal: Pilot in 2–3 projects to measure debugging efficiency gains before wider rollout."*

For Developers:

*"Tired of var_dump() spamming your CLI? global-ray lets you send anything to Ray—arrays, queries, HTML—from any PHP file, even CLI scripts. It’s like dd() but interactive:

  • Pause execution and step through code.
  • View formatted data (no more parsing var_dump output).
  • Works everywhere: Laravel, Symfony, plain PHP.

Just install it globally (composer global require spatie/global-ray), and ray() will work in every project. Free for up to 20 messages/session—perfect for debugging without extra cost."*

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4