ahmed-bhs/doctrine-doctor
Doctrine Doctor is a runtime analysis tool for Doctrine ORM integrated into the Symfony Web Profiler. It detects real-world issues like N+1 queries, slow queries, missing indexes, hydration overhead, and injection risks, with actionable backtraces and suggestions.
Local setup guide to contribute efficiently to Doctrine Doctor.
git clone https://github.com/YOUR-USERNAME/doctrine-doctor.git
cd doctrine-doctor
git remote add upstream https://github.com/ahmed-bhs/doctrine-doctor.git
composer install
Use the project Composer scripts:
# Tests
composer test
# Static analysis
composer phpstan
# Coding standards (ECS)
composer ecs
# Complete checks
composer check
Auto-fix commands:
composer cs:fix
doctrine-doctor/
├── src/
│ ├── Analyzer/
│ ├── Collection/
│ ├── DTO/
│ ├── Factory/
│ ├── Issue/
│ ├── Suggestion/
│ ├── Template/
│ └── ValueObject/
├── tests/
├── config/
├── docs/
└── CHANGELOG.md
git checkout -b feature/my-change
composer checkgit add .
git commit -m "feat: add XYZ analyzer"
Enable bundle debug options:
doctrine_doctor:
profiler:
show_debug_info: true
debug:
enabled: true
internal_logging: true
Note: internal_logging adds overhead; use it only when investigating issues.
symfony new test-app
cd test-app
In the app composer.json:
{
"repositories": [
{
"type": "path",
"url": "../doctrine-doctor"
}
]
}
Then:
composer require --dev ahmed-bhs/doctrine-doctor:[@dev](https://github.com/dev)
composer check passesCHANGELOG.md) updated when relevantHow can I help you explore Laravel packages today?