Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpdoc2Rst Laravel Package

patgod85/phpdoc2rst

phpdoc2rst converts PHPDoc comments in your PHP source code into reStructuredText documentation. It parses annotations and class structure to generate clean RST files suitable for Sphinx and other doc toolchains, helping you keep API docs in sync with your codebase.

View on GitHub
Deep Wiki
Context7

The tool for building of documentation of shared API in reStructuredText format.

Frequently asked questions about Phpdoc2Rst
What is patgod85/phpdoc2rst used for?
It converts PHPDoc comments and class structure in PHP source code into reStructuredText API documentation. The generated RST files are designed for Sphinx and similar documentation toolchains. It is most useful when you want shared API docs to stay close to the codebase instead of maintaining them by hand.
How do I install patgod85/phpdoc2rst in a Laravel project?
Install it with Composer, usually as a development dependency, using composer require --dev patgod85/phpdoc2rst. After installation, run the tool from your project's vendor/bin directory or use the command shown in the package README. Because it is a documentation generator, it does not need to be loaded in production.
Does phpdoc2rst work with Laravel applications?
Yes, it can parse PHP classes and PHPDoc comments in a Laravel application like any other PHP codebase. It is not a Laravel-specific package, so it does not automatically understand facades, magic methods, or framework conventions unless those are described in your PHPDoc. You can use it to document your own app or package APIs that are written with standard PHPDoc blocks.
What output format does phpdoc2rst generate?
It generates reStructuredText files, commonly known as RST files. These are plain-text documentation sources that can be consumed by Sphinx and other RST-aware tools. The output is intended to be readable and suitable for building HTML or other documentation formats.
Do I need Sphinx to use phpdoc2rst?
No, phpdoc2rst only produces reStructuredText files. Sphinx is the most common consumer because it builds documentation sites from RST, but you can also use other tools that read reStructuredText. If you already have a Sphinx docs pipeline, the generated files can usually be added to its source directory.
Can phpdoc2rst document only the public API of my Laravel package?
The tool is aimed at shared API documentation, so you typically write PHPDoc blocks on the classes and methods you want to publish. It parses those comments and class structure rather than guessing intent from Laravel conventions. Check the README for any supported filtering or exclusion annotations before relying on it for a large codebase.
Which PHP and Laravel versions are supported by phpdoc2rst?
Compatibility is determined by the package release, so check its composer.json and Packagist metadata for the PHP version constraint. Laravel version support is less relevant because the tool parses PHP source code rather than integrating with the framework. For a Laravel app, confirm your PHP version matches the package requirement before installing.
How is phpdoc2rst different from phpDocumentor?
phpDocumentor primarily generates HTML API documentation, while phpdoc2rst focuses on reStructuredText for Sphinx-style doc builds. If your team already writes documentation in RST, phpdoc2rst can fit that workflow more directly. If you need a browseable HTML API reference out of the box, phpDocumentor may be a better fit.
Can I run phpdoc2rst in CI to keep Laravel API docs updated?
Yes, you can install it as a Composer dev dependency and run it as part of your CI pipeline. Generate the RST files, then commit them or publish them as build artifacts depending on your docs workflow. Review the generated diffs and pin the package version so documentation changes are predictable.
Is patgod85/phpdoc2rst actively maintained?
Maintenance status should be checked on the GitHub repository and Packagist release history before adopting it. Look at the latest commit date, open issues, and whether the package declares support for your PHP version. For production use, pin a known-good version and test generation against your codebase.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections