shamotj/pdo-profiler-bundle

PDO Profiler for Symfony

dev-master 2018-12-18 16:01 UTC

This package is not auto-updated.

Last update: 2024-11-14 16:28:34 UTC


README

This code is based on sorien/silex-dbal-profiler and maximebf/debugbar.

Install

Composer

    composer require shamotj/pdo-profiler-bundle

That should add dependency into config/bundles.php. If you have service which typehints to PDO, you should be fine. If not, you need to pass PDO instance to constructor. This can be done by overriding services.yml in your global file.

For example like this:

  pdo_data_collector:
    class: Shamotj\PdoProfilerBundle\DataCollector\PdoDataCollector
    arguments: ["@=service('App\\\\Service\\\\DbService').getPDO()"]
    public: false
    tags:
    - name: data_collector
      id: 'pdo_data_collector'
      template: 'ShamotjPdoProfilerBundle:Collector:db.html.twig'