Skip to main content

PHP repositories

Documentation for PHP and Laravel codebases, kept current from the code

phpDocumentor and Doctum turn PHPDoc blocks into API reference. Moxie Docs covers what they leave out: how the application is laid out, which routes it serves, which Composer packages it leans on, how to run its checks, and the conventions a new engineer or coding agent should follow.

Quick Answer: Moxie Docs reads PHP repositories structurally. It captures namespaced classes, interfaces, traits, enums, and functions with their PHPDoc summaries, resolves use statements to files, reads Composer require and require-dev, extracts Laravel, Symfony, and Slim routes, recognizes PHPUnit and Pest tests, and detects the project's real check commands such as php artisan test or composer run lint. It uses that to write architecture and convention docs and keep them current on every merge.
  • Laravel and Symfony aware. Route files, attributes, and resource routes become a documented API surface.
  • Composer native. Packages, scripts, and dev tools come straight from composer.json.
  • Checked on merge. Docs that cite a changed class or route file are re-checked before they drift.

What you get

What Moxie Docs reads in a PHP repo

Routes

Laravel Route:: verbs, match, resource and apiResource, prefix groups in the same file, and the /api prefix on routes/api.php. Symfony #[Route] attributes and @Route annotations with class prefixes. Slim and Lumen $app->get.

Symbols with PHPDoc

Namespaced classes, interfaces, traits, enums, and functions, each with its PHPDoc summary. Functions keep parameters and return types, and @internal marks a symbol private.

Use statements resolved

Grouped, aliased, use function, and use const imports resolve to files under app/ and src/, so PR checks know which classes depend on a change.

Composer packages

Dependencies come from require and require-dev, matched to namespaces such as Illuminate to laravel/framework and Symfony\Component to the right symfony package.

Real check commands

Composer scripts first, then Pint or PHP-CS-Fixer, phpcs, PHPStan, Larastan or Psalm, and php artisan test, Pest, or PHPUnit - whatever the repo actually uses.

Tests recognized

PHPUnit and Pest files under tests/ and any *Test.php count as tests, not as undocumented source.

How it works

From a PHP repo to current docs

  1. 01

    Connect GitHub

    Install the app on the PHP repositories you want covered. vendor/, bootstrap/cache, storage/framework, and Blade templates are skipped for symbols.

  2. 02

    First index

    Moxie Docs reads classes and routes, resolves use statements, reads composer.json and tool config, and writes the architecture, conventions, API surface, and setup pages.

  3. 03

    Agents read it

    Cursor, Claude Code, and Codex get the same docs, conventions, and check commands over MCP before they edit.

  4. 04

    Merges keep it true

    Every merge re-checks the pages that cite changed files. Fixes arrive as docs-only PRs your team reviews.

Scope

Where Moxie Docs fits next to phpDocumentor

PHP already has API reference generators. Moxie Docs does not replace them.

phpDocumentor, Doctum, and phpDox render a page per class from PHPDoc blocks. That is the right tool when you publish a package and need full method-level reference. They do not explain how a Laravel app is wired together, notice when a merged change made a setup guide wrong, or tell a coding agent which conventions your team follows.

Moxie Docs writes that descriptive layer from the repository and keeps it current. Existing Markdown docs are indexed and checked for drift, never overwritten.

  • PHPDoc generators: per-class and per-method API reference.
  • Moxie Docs: architecture, routes, conventions, and setup, re-checked on every merge.
  • Not covered yet: individual methods and class constants, and route prefixes applied from a service provider.

Get started

Point Moxie Docs at a PHP repository

The first index reads your routes, Composer packages, and tooling and writes the architecture, conventions, and setup docs. Free on one repo, no card required.