Weave 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

Laravel Ray Laravel Package

spatie/laravel-ray

Send debug output from any Laravel app to Ray, Spatie's desktop debugging tool. Inspect HTML, arrays, queries, and Markdown, measure performance, and pause execution—all with the familiar dump-style workflow.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: spatie/laravel-ray is a development-time instrument, not a runtime component. It is a thin Laravel service provider plus a set of macros (query builder, test response, mailables, HTTP client, views, jobs) that serialize payloads and POST them to a local HTTP listener on localhost:23517 owned by the Ray desktop application. Architecturally this is a non-invasive, opt-in side channel: it registers watchers for exceptions, queries, mail, jobs, and cache/view events, and exposes global helpers (ray(), rd()) that no-op when disabled. It fits cleanly into a Laravel codebase precisely because it can be excluded from the production dependency graph via require-dev, which is the single most important architectural decision a TPM should enforce.

Integration feasibility: High on the PHP side, low on the organizational side. Composer install, auto-discovery, optional config publish (ray:publish-config), and env-var driven settings (RAY_HOST, RAY_PORT, enable flags) mean a single developer can be productive in under an hour. The friction is that the package is functionally inert without the Ray desktop client, which is a separate proprietary, commercially licensed product (free trial limited to 20 messages per session). The MIT license on this repository does not extend to the client. That is a procurement, not engineering, dependency.

Technical risk:

  • Vendor coupling to a closed-source client. The package is a first-party Spatie wrapper for a paid app. Any org-wide rollout implies per-seat licensing and a vendor relationship outside normal OSS governance.
  • Accidental production exposure. The helpers are global and easy to leave in committed code. If the package is present in production (--no-dev not used, or an over-broad require), ray() calls become outbound HTTP attempts to a nonexistent host — latency, log noise, and a data-egress question if RAY_HOST is ever misconfigured to a remote address.
  • Containerized development mismatch. localhost inside a Docker/Sail/DDEV container is not the host machine; RAY_HOST must be set per environment, and this is a recurring onboarding failure mode.
  • Version/platform churn. The changelog shows repeated Laravel-major catch-up releases (Laravel 12 in 1.39.1, Laravel 13 in 1.43.6) and PHP 8.5 boot regressions fixed in 1.43.8 (register() made declarative, setProjectName() moved to boot()). It tracks framework releases promptly but is not a stable-ABI dependency.
  • Weak community signal. 320 stars and 0 listed dependents understates real-world use (it is a dev dependency, so it rarely appears in dependency graphs), but it also means blast-radius signals are hard to read from the ecosystem. Mitigated by the fact that it is a Spatie-maintained package with CI (tests + PHPStan), a changelog, and a documented security policy.

Key questions:

  1. Is the Ray desktop client already licensed in the org, or is this a new per-seat purchase? What is the cost at team size?
  2. Do we accept a closed-source developer tool in the local toolchain, and does it pass security review for a client that receives full source paths, query text, env output, and mail bodies?
  3. What is the concrete pain we are solving — if it is production observability, this is the wrong tool (Telescope, OpenTelemetry, Sentry are the right comparison set); if it is developer dump()-loop latency, this is the right tool.
  4. Which environments are in scope: individual laptops only, or shared staging/dev servers where multiple developers would collide on a single host listener?
  5. Does the containerized dev setup (Sail/DDEV/K8s dev namespaces) support host-reachable RAY_HOST configuration today?

Integration Approach

Stack fit: Laravel-first, PHP-first, and deliberately narrow. Requirements are a supported Laravel major (currently up through Laravel 13 per 1.43.6) and a compatible PHP runtime (PHP 8.5 deprecations addressed in 1.41.0 and 1.43.8). Octane compatibility has existed since 1.17.2, which matters for teams on long-lived workers. It does not serve non-PHP services, so it cannot be a standard across a polyglot stack — the sibling spatie/ray and JS packages would be separate adoptions.

Migration path: Additive, not substitutive. Install with composer require --dev spatie/laravel-ray, publish config if non-default host/port or project naming is needed, keep ray() calls inside the existing debug workflow alongside dump()/dd()/Telescope. There is no data migration, no schema change, no API contract change, and no runtime path alteration when disabled. The realistic "migration" is cultural: developers replacing dd()-and-refresh loops and tail -f storage/logs/laravel.log with payload inspection.

Compatibility: Watch three surfaces. (1) Composer constraint resolution against the app's Laravel/PHP matrix — pin a minor and let Renovate/Dependabot handle bumps, since minor releases here are frequently framework-version catch-ups. (2) CI — the package must be absent or explicitly disabled in pipelines; --no-dev installs in deploy and CI images are the primary control. (3) Container networking — RAY_HOST must be documented per dev topology (host.docker.internal, DDEV hostname, etc.).

Sequencing:

  1. Spike (1 dev, 1 sprint portion): one engineer installs in a sandbox branch, validates the container/host networking story, confirms the client license path, and measures whether the macros (query, mail, HTTP, test response) actually shorten their loop.
  2. Guardrails before wider rollout: require-dev enforcement in review checklist, a lint rule or grep gate in CI for ray(/rd(/dump( in application code, and a documented RAY_ENABLED=false default for any shared environment.
  3. Pilot (3–5 devs): roll out to one Laravel service; collect a short qualitative writeup on time-to-diagnose for a set of representative bugs versus the status quo.
  4. Procurement and decision: if the pilot shows value, purchase seats and publish a one-page internal standard (install snippet, env matrix, do/don't). If not, remove — cost of reversal is a single composer remove.

Operational Impact

Maintenance: Low and asymmetric. In production, zero — nothing ships if --no-dev is used. In development, the maintenance burden is routine dependency bumps with occasional framework-major catch-up releases; the package has historically lagged a Laravel major by weeks, not quarters, but the PHP 8.5 boot regression in 1.43.8 shows that minor bumps can break app boot. Budget for treating this as a pinned, Dependabot-managed dev dependency rather than a floating ^1.0.

Support: Two-tier. The package itself gets community/Spatie OSS support through GitHub issues under an MIT license with no SLA. The actual user-facing product — the Ray client — requires a commercial relationship, and the debugging workflow degrades to a 20-message trial without it. Escalation paths, refund terms, and seat management are vendor-negotiation items a TPM must own, not delegate to the team.

Scaling: Scales per developer, not per service. Each engineer runs their own client and their own local listener; there is no shared server, no aggregation, and no multi-tenant story. This is a feature (no infrastructure to run, no data leaving the laptop under default config) and a limitation (no team-wide shared debugging session, no historical record of debug payloads). If the org wants shared debugging context, this is not the tool. Also note the container topology cost scales with environment diversity — every new dev image variant is a new RAY_HOST configuration to document.

Failure modes:

  • Client not running / port blocked: outbound POST fails. Historically the package is designed to degrade quietly, but this is the failure most likely to cause perceived slowness in ray()-heavy code paths; verify behavior on the pinned version rather than assuming.
  • Present in production: the highest-severity failure. Symptom is outbound connection attempts to localhost:23517 and swallowed errors on every instrumented path. Control is deploy-time (--no-dev) plus a CI assertion.
  • Misconfigured RAY_HOST in containers: silent loss of payloads; developers conclude "the package is broken."
  • Leftover debug calls in merged code: the more likely real-world incident — noisy logs, and in the worst case a dump of sensitive data in a shared environment. This is a code-review and CI problem, not a package problem.
  • Framework-major upgrade collisions: a Laravel upgrade lands before the corresponding package release, blocking the dev environment (not production). Pin and stage accordingly.

Ramp-up: Very low for any PHP developer already fluent in dump() — the mental model is identical, the syntax is ray() instead of dump(). Expect under a day to first productive use, with the main onboarding friction being the client install/license and the RAY_HOST step in containerized setups. Documentation is hosted externally at myray.app rather than in-repo, which is fine but means the internal runbook should capture the version-specific env matrix and the security posture (what data leaves the process, and to where) so developers don't have to infer it.

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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections