ahmed-bhs/doctrine-doctor
Doctrine Doctor is a runtime analysis tool for Doctrine ORM that plugs into the Symfony Web Profiler. It ships 90+ analyzers to catch N+1 queries, missing indexes, slow queries, injection risks, and other performance, security, and integrity issues.
composer require --dev ahmed-bhs/doctrine-doctor in your Symfony project. On v2.11.x the bundle ships with the runtime analysis path reworked (see Gotchas), so no extra wiring is needed beyond the usual Flex recipe.profiling_collect_backtrace: true under doctrine.dbal in config/packages/dev/doctrine.yaml.dev environment, open the Symfony Web Profiler, and navigate to the Doctrine Doctor panel to inspect runtime Doctrine issues. Since v2.11.2 the panel data is attached at view time instead of blocking the response, so the page render is no longer gated on analysis completion.Development Phase:
Code Review:
Testing:
addSelect() in your QueryBuilder.profiling_collect_backtrace: true is set in your Doctrine configuration.slow_query) have default thresholds that might be too high for your environment. Adjust them in config/packages/dev/doctrine_doctor.yaml.enabled: false in the config.doctrine_doctor.enabled is set to true.SELECT permissions to execute EXPLAIN queries.enabled: false.n_plus_one) allow custom thresholds. Adjust these based on your project’s needs.dev, staging).doctrine_doctor.issue.detected) to integrate with custom logic or logging.How can I help you explore Laravel packages today?