2017 © Pedro Peláez
 

library companion-bundle

This package adds several helpers, like the debug:container command

image

mini-symfony/companion-bundle

This package adds several helpers, like the debug:container command

  • Thursday, December 8, 2016
  • by Edwin-Luijten
  • Repository
  • 1 Watchers
  • 0 Stars
  • 138 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 10 % Grown

The README.md

Companion bundle for Mini Symfony Skeleton

This bundle can also be used with the MicroFramework bundle, (*1)

Debug tools

Console commands

  • debug:container
  • debug:router
  • debug:event-dispatcher

Debug bar (disabled by default)

With the debug bar you can gather information about the following: - Environment information - Current route - Request information - Queries - Events - Timeline, (*2)

Configuration

routes.yml, (*3)

...
companion_bundle:
  resource: '@CompanionBundle/Resources/config/routes.yml'
  prefix: _debugbar

config.yml, (*4)

mini_symfony:
  debug:
    debugbar:
      enabled: false

      # Enable/disable DataCollectors
      collectors:
        events: false
        exceptions: false
        request: true
        routing: true
        phpinfo: true
        kernel: true
        time: true
        memory: true
        queries: false

      # Configure some DataCollectors
      options:
        queries:
          with_params: true # Render SQL with the parameters substituted
          timeline: false # Add the queries to the timeline
          explain:
            enabled: false
            types:
              - SELECT # SELECT, INSERT, UPDATE, DELETE for MySQL 5.6.3+
          hints: true # Show hints for common mistakes
        routing:
          label: true

Query collector

Get performance information about your queries., (*5)

Configuration

  1. Enable the query logger for your dbal connection:
services:
  dbal_logger:
    class: Doctrine\DBAL\Logging\DebugStack  

  dbal_config:
    class: Doctrine\DBAL\Configuration
    calls:
      - [setSQLLogger, ['@dbal_logger']]

  dbal:
    class: Doctrine\DBAL\Connection
    factory: ['Doctrine\DBAL\DriverManager', getConnection]
    arguments:
      - '%database%'
      - '@dbal_config'
  1. Enable extra options for the query collector
...
options:
    queries:
      with_params: true # Render SQL with the parameters substituted
      timeline: false # Add the queries to the timeline
      explain:
        enabled: false
        types:
          - SELECT # SELECT, INSERT, UPDATE, DELETE for MySQL 5.6.3+
      hints: true # Show hints for common mistakes

The Versions

06/12 2016

dev-debug-commands

dev-debug-commands

This package adds several helpers, like the debug:container command

  Sources   Download

MIT

The Requires

 

The Development Requires

by Edwin Luijten

console symfony mini

06/12 2016
18/11 2016
18/11 2016