Introduction
The Ultimate PHP Documentation Generator
PHP autodoc automatically generates OpenAPI 3.1.0 documentation for your PHP projects to keep your API docs always up-to-date and easy to maintain.
In Laravel projects, autodoc-laravel offers seamless integration with routes, request validation, database models, API resources, and more.
How it works?
PHP autodoc uses PHP parser and PHPDoc parser to analyze your code and convert it into AutoDoc\DataTypes\Type
objects. These objects can be used in your custom PHP autodoc extensions and are also utilized in generating OpenAPI 3.1.0 schemas. If you are using a static analysis tool like PHPStan, you will find that autodoc works well without any changes to your codebase.
Tips to improve the generated documentation
- Enable
debug
mode in autodoc configuration to show any errors that may occur during code analysis. By default,debug
mode is disabled and errors are silently ignored. - Increase
max_depth
setting in autodoc configuration to allow for deeper analysis of your codebase. - Use a tool like PHPStan to analyze your codebase and fix any issues that may occur. This will improve the quality of your code and help autodoc generate more accurate documentation.