beastbytes / cod-php
PHP API document generator that uses PHP Reflection to analyse the code.
V1.1.0
2026-09-23 13:01 UTC
Requires
- php: ^8.4
- phpdocumentor/reflection-docblock: ^6.0
- symfony/console: ^8.0
- yiisoft/files: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^v3.0
- pestphp/pest: ^5.0
- vimeo/psalm: ^6.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-23 13:04:54 UTC
README
A Reflection based PHP API Documentation Generator
CodPhp is an API document generator for PHP that uses Reflection (hence the name) to analyse files in a given namespace. It uses a Writer, templates, and a template renderer to generate the documentation in any desired format; out-of-the-box, CodPhp generates documentation in Markdown suitable for use with VitePress.
Features
- Reflection analysis of the namespace - CodPhp analyses all Classes, Enums, Interfaces, and Traits, and the Constants, Methods, and Properties in them.
- PhpDoc docBlock parsing - CodPhp parses docBlocks to extract element summary and/or description, and some tags.
- Inheritance - CodPhp shows inheritance for classes, interfaces, and traits, and class child-classes, interface implementation, and trait usage.
- Cross-referencing - CodPhp generates links between elements in the namespace.
- Type referencing - CodPhp generates links to PHP types and extension classes and exceptions, and namespace defined types.
- Source code links - CodPhp optionally generates links to source code.
- Error reporting - CodPhp collects and reports errors found in the documentation.
- Flexible templating and output formating - CodPhp supports using a user defined template renderers, templates, and/or Writers, allowing documentation to be generated in any format. Out-of-the-box, CodPhp generates documentation in Markdown suitable for use with VitePress.
For licence information see the LICENCE file.
Documentation is at https://beastbytes.github.io/cod-php/