Download the PHP package saggre/phpdocumentor-markdown without Composer
On this page you can find all versions of the php package saggre/phpdocumentor-markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saggre/phpdocumentor-markdown
More information about saggre/phpdocumentor-markdown
Files in saggre/phpdocumentor-markdown
Package phpdocumentor-markdown
Short Description Markdown template for phpDocumentor3
License MIT
Informations about the package phpdocumentor-markdown
phpDocumentor-markdown - Automatically generate Markdown documentation
Use cases: In-repository documentation, GitHub/GitLab wikis, AI prompt context.
Markdown template for phpDocumentor3
Wish there was an easy way to generate PHP source code documentation? \
Using phpDocumentor
with phpDocumentor-markdown
template, you can automatically generate GitHub/GitLab-ready Markdown documentation from PHP source code.
This template can be used to document:
Name | Descriptions | Inheritance | Implements | Constants | Properties | Methods | Inherited methods | |
---|---|---|---|---|---|---|---|---|
Classes | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Interfaces | ✅ | ✅ | ✅ | ➖ | ✅ | ✅ | ✅ | ➖ |
Traits | ✅ | ✅ | ➖ | ➖ | ✅ | ✅ | ✅ | ➖ |
Name | Descriptions | Types (parameter, return, etc.) | Access modifiers | |
---|---|---|---|---|
Functions | ✅ | ✅ | ✅ | ✅ |
Methods | ✅ | ✅ | ✅ | ✅ |
Properties | ✅ | ✅ | ✅ | ✅ |
Example
Examples are available in the .wiki directory.
Installation & Usage
- Please refer to this guide for instructions on installing phpDocumentor.
- Usage instructions assume that
phpdoc
is the phpDocumentor binary.
Running manually
Using Composer
Installation via Composer
Running manually after installing via Composer
Installation & Usage tips
Adding a Composer helper script
Add this script to your composer.json
and run composer create-docs
to generate the documentation.
Using with PhpDocumentor XML config
Add a template element to your phpDocumentor XML config and run phpDocumentor
to generate the documentation.
You can also check out the config file used for generating this repository's example documentation for a full example.
GitLab wiki
The output of this template can be used directly as a GitLab wiki.
GitHub wiki
⚠️ GitHub wiki uses a flat directory structure for linking, so the internal links in the resulting documentation will not work as expected.
CI pipelines
You can use the PhpDocumentor Docker image with this template in your CI pipelines to generate documentation automatically.
AI integration
The generated documentation can be used as prompt context for AI models that work with source code. For other use cases you'll likely want structured data, like JSON.
Running tests
Contributing
- There are unit tests and functional tests available in the
tests
directory.- Unit tests are used to test individual Twig macros
- Functional tests are used to test the whole documentation generation process