mini-symfony / companion-bundle
This package adds several helpers, like the debug:container command
0.1.2
2016-12-08 10:32 UTC
Requires
- php: ^5.5.9|^7.0
- maximebf/debugbar: ^1.13
- symfony/config: ^3.0
- symfony/console: ^3.0
- symfony/dependency-injection: ^3.0
- symfony/filesystem: ^3.0
- symfony/finder: ^3.0
- symfony/http-kernel: ^3.0
- symfony/routing: ^3.0
- symfony/var-dumper: ^3.0
- symfony/yaml: ^3.0
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0
- squizlabs/php_codesniffer: ~2.0
This package is auto-updated.
Last update: 2024-11-13 21:17:21 UTC
README
This bundle can also be used with the MicroFramework bundle
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
Configuration
routes.yml
... companion_bundle: resource: '@CompanionBundle/Resources/config/routes.yml' prefix: _debugbar
config.yml
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.
Configuration
- 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'
- 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