Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Doctor Laravel Package

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.

View on GitHub
Deep Wiki
Context7

layout: default title: Development parent: Contributing nav_order: 2

Development Setup

Local setup guide to contribute efficiently to Doctrine Doctor.


Prerequisites

  • PHP 8.4+
  • Composer 2+
  • Git

Clone

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

Install

composer install

Quality Commands

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

Project Structure

doctrine-doctor/
├── src/
│   ├── Analyzer/
│   ├── Collection/
│   ├── DTO/
│   ├── Factory/
│   ├── Issue/
│   ├── Suggestion/
│   ├── Template/
│   └── ValueObject/
├── tests/
├── config/
├── docs/
└── CHANGELOG.md

Typical Workflow

  • Create a branch:
git checkout -b feature/my-change
  • Implement changes + focused tests
  • Run composer check
  • Commit:
git add .
git commit -m "feat: add XYZ analyzer"
  • Push + open PR

Debugging

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.


Local Integration Test (Symfony app)

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)

Before Opening PR

  • composer check passes
  • docs updated when behavior/config changes
  • root changelog (CHANGELOG.md) updated when relevant

Overview → | Creating Analyzers →

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver