Description
yii2-apidoc is an API documentation generator for PHP projects, maintained by the Yii project. It has two commands. The api command builds class API documentation from your PHP code, using phpDocumentor as its base, so doc comments follow phpDocumentor syntax. The guide command renders markdown files, such as the Yii guide, into HTML pages, and it builds an index from a README that links to the guide sections. You can combine the two outputs to generate class docs and guide docs in one place. The generated HTML uses a bootstrap template by default, and you can pick another with the template parameter. The package needs PHP 8.2 or newer. Install it with Composer, either through the composer require command or by adding the package to the require section of composer.json and running composer update. After install it creates an executable at vendor/bin/apidoc, and the help command for api and guide lists the options. It is aimed at PHP developers who want browsable documentation for their own library or framework.…
Highlights
- Class API docs from phpDocumentor-style comments
- Markdown guide rendering to HTML
- Combined API and guide output
- Selectable HTML templates, bootstrap by default
- Command-line tool installed with Composer
Ratings & Reviews
No ratings yet
Be the first to rate Yii2 Apidoc.
People also visit
Yii2 Apidoc FAQ
What is yii2-apidoc?
It is a command-line tool that generates API documentation for PHP classes and renders markdown guides into HTML pages.
Which PHP version does it need?
PHP 8.2 or newer. Install it with Composer.
How do I run it?
After install, run vendor/bin/apidoc api for class documentation or vendor/bin/apidoc guide for guide pages. Run apidoc help api or apidoc help guide to see the options.
Can I change the look of the output?
Yes. The bootstrap template is the default, and you can choose another template with the --template parameter.
What are the best Yii2 Apidoc alternatives?
Popular alternatives to Yii2 Apidoc include DocFX, Pdoc and Jsdoc. See all Yii2 Apidoc alternatives