sidus/doctrine-debug-bundle

Adds stack trace to Doctrine queries in Symfony profiler

v1.0.2 2018-06-28 10:58 UTC

This package is auto-updated.

Last update: 2024-11-08 22:49:42 UTC


README

Introduction

This bundle adds a stack trace to each doctrine query in the profiler.

Example

Installation

Require the bundle with composer:

$ composer require sidus/doctrine-debug-bundle "~1.0"

Add the bundle to AppKernel.php

<?php

use Symfony\Component\HttpKernel\Kernel;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
        ];

        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
            // ...

            if ('dev' === $this->getEnvironment()) {
                $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
                $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();

                // HERE!
                $bundles[] = new Sidus\DoctrineDebugBundle\SidusDoctrineDebugBundle();
            }
        }

        return $bundles;
    }
    // ...
}

Changelog

v1.0.2

Doesn't require xdebug to be installed anymore.

v1.0.1

Fixing compatibility with Web Profiler 4