PHPackages                             szczyglis/extended-dump-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. szczyglis/extended-dump-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

szczyglis/extended-dump-bundle
==============================

An extension that enhances the debugging capabilities of Symfony 4, 5, and 6 frameworks.

v1.2.2(1y ago)31.7kMITPHPPHP ^7.2.5|^8.0

Since Apr 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/szczyglis-dev/extended-dump-bundle)[ Packagist](https://packagist.org/packages/szczyglis/extended-dump-bundle)[ Docs](https://github.com/szczyglis-dev/extended-dump-bundle)[ RSS](/packages/szczyglis-extended-dump-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (12)Versions (7)Used By (0)

Release: **1.2.2** | build: **2024.08.26** | PHP: **^7.2.5|^8.0**

### Supported Versions of Symfony:

[](#supported-versions-of-symfony)

**4.4+**, **5.x**, **6.x**

Extended Dump Bundle
====================

[](#extended-dump-bundle)

**The Extended Dump Bundle is an extension for the Symfony framework. It enhances the `dump` function of the framework with new features. It attaches a new dockable window to the application that displays debug information collected from all dumps made using the new method. This centralized view allows quick access to dumped objects, variables, and system-related information. The bundle introduces a new global function, `xdump`, enabling you to use Extended Dump anywhere in your application code.**

How to install
--------------

[](#how-to-install)

```
composer require szczyglis/extended-dump-bundle

```

Features
--------

[](#features)

- **New Configurable Window:** Groups dumped objects in an organized manner.
- **New Global Function (`xdump`):** Facilitates quick debugging.
- **Centralized Dumped Objects:** Consolidates all dumped objects in one easily accessible place.
- **Comprehensive Information Display:** Shows useful debug information such as the current user, request and response objects, variables from `$_GET`, `$_POST`, `$_SESSION`, `$_COOKIE`, `$_ENV`, and `$_SERVER`, as well as information about PHP and its modules. It also includes lists of Doctrine entities and repositories with their properties and methods, parameters, and more.
- **Event Extensibility:** Extend functionality using events.
- **Customizable Layout:** Modify the appearance using Twig.
- **Fully Configurable:** Adjust settings to fit your needs.

How it works
------------

[](#how-it-works)

**Appearance After Installation**

After installation, a small icon will appear in the lower right corner of the page. Clicking this icon will open the debugger window.

[![trigger _cornerpng](https://user-images.githubusercontent.com/61396542/165001953-7c7a33d1-e2a7-4b24-b5d1-f52389e03e97.png)](https://user-images.githubusercontent.com/61396542/165001953-7c7a33d1-e2a7-4b24-b5d1-f52389e03e97.png)

The debug window is divided into three sections:

- **app:** This section contains all variables collected using the `xdump` function.
- **event:** Displays debug information added using your own `Event Subscriber`.
- **system:** Shows the most useful and handy system information.

[![divide](https://user-images.githubusercontent.com/61396542/165999714-e3a2d4d5-c315-42c0-a1f7-2e4154c66b87.png)](https://user-images.githubusercontent.com/61396542/165999714-e3a2d4d5-c315-42c0-a1f7-2e4154c66b87.png)

The New `xdump` Global Function
-------------------------------

[](#the-new-xdump-global-function)

The extension adds a new global function to the framework called `xdump`. This function allows you to use **Extended Dump** from anywhere in your code. It works similarly to the standard `dump` function, but the debugged objects are collectively sent to the **Extended Dump** window.

*Example of use:*

```
    /**
     * @Route("/", name="index")
     * @param Request $request
     * @return Response
     */
    public function index(Request $request)
    {
        $foo1 = 'bar1';
        $foo2 = 'bar2';
        $foo3 = 'bar3';

        xdump($foo1, $foo2, $foo3);

        return $this->render('index.html.twig');
    }
```

Adding the above code anywhere in the application, whether in controllers or services, will include the `app` section in the debugger and display the dumped object (or objects) there.

*Example of use:*

```
