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

Dumper Laravel Package

spiral/dumper

High-performance PHP variable dumper for the Spiral framework. Provides readable, developer-friendly dumps for debugging in CLI or web, with clean formatting and easy integration into your app to inspect arrays, objects, and complex data structures.

View on GitHub
Deep Wiki
Context7

Spiral: Colorful variable dumper

Latest Stable Version Codecov

With spiral/dumper, developers can easily inspect and analyze variable values during the development process, making it an indispensable tool for debugging and troubleshooting in web and CLI applications.

The component provides a wrapper over the symfony/var-dumper library. This component sends dumps directly to the browser within HTTP workers or to the STDERR output in other environments.

Installation

Use Composer to install the package:

composer require spiral/dumper

Usage

Symfony VarDumper

In your code:

dump($variable);

In an application using RoadRunner, you cannot use the dd() function. But the package provides an alternative \rr\dd() function. To use it, you need to add Spiral\Debug\Middleware\DumperMiddleware in the application, after ErrorHandlerMiddleware:

use Spiral\Bootloader\Http\RoutesBootloader as BaseRoutesBootloader;
use Spiral\Debug\Middleware\DumperMiddleware;
use Spiral\Http\Middleware\ErrorHandlerMiddleware;

final class RoutesBootloader extends BaseRoutesBootloader
{
    protected function globalMiddleware(): array
    {
        return [
            ErrorHandlerMiddleware::class,
            DumperMiddleware::class,
            // ...
        ];
    }

    // ...
}

Buggregator

The package provides a built-in integration with the Buggregator service via Trap library.

  1. Run a Buggregator server:
    • Full server using Docker:
      docker run --rm --pull always -p 127.0.0.1:8000:8000 -p 127.0.0.1:1025:1025 -p 127.0.0.1:9912:9912 -p 127.0.0.1:9913:9913 ghcr.io/buggregator/server:latest
      
    • Mini server using PHP:
      ./vendor/bin/trap
      
  2. Use trap() function instead of dump() to send dumps to the Buggregator server:
    trap($variable);
    

License

The MIT License (MIT). Please see LICENSE for more information. Maintained by SpiralScout.

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
milesj/emojibase
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