- PHP
>=8.1(<8.6). Symfony 8.0 and 8.1 require PHP 8.4+. - Symfony 7.4, 8.0, or 8.1 (mandatory minimum minors). The bundle also supports Symfony 6.x and 7.0–7.3 when constraints resolve.
symfony/security-bundle(or equivalent) in your application for role-based gates.twig/twigoptional — required only for{{ cdbg() }}and{% cdbg %}Twig integration.
composer require nowo-tech/console-debug-bundleThe recipe enables the bundle and adds config/packages/nowo_console_debug.yaml. Adjust roles and options as needed.
- Register the bundle in
config/bundles.php:
return [
// ...
Nowo\ConsoleDebugBundle\NowoConsoleDebugBundle::class => ['all' => true],
];- Create
config/packages/nowo_console_debug.yaml:
nowo_console_debug:
enabled: true
roles:
- ROLE_CONSOLE_DEBUG
console_method: log
label_prefix: '[cdbg]'
shorten_paths: true- Grant a debug role to trusted users:
security:
role_hierarchy:
ROLE_CONSOLE_DEBUG: ROLE_USER