PHPackages                             abbadon1334/phpdoc-to-rst - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abbadon1334/phpdoc-to-rst

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abbadon1334/phpdoc-to-rst
=========================

Generate Sphinx/ReStructured documentation from PHPDoc

1.1(5y ago)12273AGPL-3.0-or-laterPHP

Since Jul 12Pushed 1y agoCompare

[ Source](https://github.com/abbadon1334/phpdoc-to-rst)[ Packagist](https://packagist.org/packages/abbadon1334/phpdoc-to-rst)[ RSS](/packages/abbadon1334-phpdoc-to-rst/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

phpdoc-to-rst
=============

[](#phpdoc-to-rst)

[![Codacy Badge](https://camo.githubusercontent.com/c045188c616e8f9d4333ac9563e5f0b89c220b1cd4c721ebc1299962e7af8bbc/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3338623030306632663937353461663961313130613933616264623731306339)](https://app.codacy.com/gh/abbadon1334/phpdoc-to-rst?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/phpdoc-to-rst&utm_campaign=Badge_Grade)[![Build Status](https://camo.githubusercontent.com/136e454a1e3c45d5259868289ea40d8bd1990cc3d46ca13121bfa14d059fdbbf/68747470733a2f2f7472617669732d63692e6f72672f61626261646f6e313333342f706870646f632d746f2d7273742e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/abbadon1334/phpdoc-to-rst)[![Coverage Status](https://camo.githubusercontent.com/c664d2b5a433dd5a3d3b7074be979595594548a3b935e0ec79eb759ff29634a5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f61626261646f6e313333342f706870646f632d746f2d7273742f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/abbadon1334/phpdoc-to-rst?branch=master)[![Codacy Badge](https://camo.githubusercontent.com/fc5a305fe25463c0dc8e95eb5c22b3614e53576dc7cb087c4a0f1fc3cf9c9995/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6665326365656664356365623432626138393933663663643439313762323330)](https://www.codacy.com/gh/abbadon1334/phpdoc-to-rst/dashboard?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/phpdoc-to-rst&utm_campaign=Badge_Grade)[![Codacy Badge](https://camo.githubusercontent.com/21ebd3d85e8dad6f3f00577435f764d728e82a63c7903d149624f0d7e27d9598/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f6665326365656664356365623432626138393933663663643439313762323330)](https://www.codacy.com/gh/abbadon1334/phpdoc-to-rst/dashboard?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/phpdoc-to-rst&utm_campaign=Badge_Coverage)

Forked and refactor by Francesco "Abbadon1334" Danti.

Now working as intended, with good coverage.

\##Generate reStructuredText for Sphinx based documentation from PHPDoc annotations.

This project is heavily based on [phpDocumentor/Reflection](https://github.com/phpDocumentor/Reflection)and makes use of [sphinxcontrib-phpdomain](https://github.com/markstory/sphinxcontrib-phpdomain).

An example for the documentation output can be found in our [own documentation](http://phpdoc-to-rst.readthedocs.io/en/latest/api_docs.html)

Quickstart
----------

[](#quickstart)

Install phpdoc-to-rst to your project directory:

```
composer require --dev abbadon1334/phpdoc-to-rst

```

Command line usage
------------------

[](#command-line-usage)

Run the command line tool to parse the folders containing your PHP tree and render the reStructuredText files to the output directory:

```
php vendor/bin/phpdoc-to-rst generate --repo-base "$PWD" --repo-github https://github.com/abbadon1334/phpdoc-to-rst -t docs/rst/ src/

```

Programatically usage to generate documentation rst
---------------------------------------------------

[](#programatically-usage-to-generate-documentation-rst)

```
    // your source path or multiple path to be parsed
    $src = [__DIR__.'/../src'];

    // destination path for the documentation
    $dst = __DIR__.'/../docs/api';

    $apiDocBuilder = new ApiDocBuilder($src, $dst);

    // DEBUG FATURES : optional
    // optional : activate verbosity
    $apiDocBuilder->setVerboseOutput(true);
    // optional : activate debug
    $apiDocBuilder->setDebugOutput(true);

    // EXTENSIONS : optional

    /**
     * Do not render classes marked with phpDoc internal tag
     * Do only render public methods/properties.
     */
    $apiDocBuilder->addExtension(PublicOnlyExtension::class);

    /**
     * Do not render classes marked with phpDoc internal tag
     * Do only render public methods/properties.
     */
    $apiDocBuilder->addExtension(NoPrivateExtension::class);

    /**
     * This extension will render a list of methods  for easy access
     * at the beginning of classes, interfaces and traits.
     */
    $apiDocBuilder->addExtension(TocExtension::class);

    /**
     * This extension adds a link to the source at github to all elements.
     *
     * Arguments
     * 0 => Url to the github repo (required)
     * 1 => Path to the git repository (required)
     * 2 => Branch to link to (default=master)
     */
    $apiDocBuilder->addExtension(GithubLocationExtension::class, [
        __DIR__.'/../src',
        'http://github.com/abbadon1334/phpdoc-to-rst/',
    ]);

    // Build documentation
    $apiDocBuilder->build();
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~533 days

Total

2

Last Release

2012d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5801824?v=4)[Francesco Danti](/maintainers/abbadon1334)[@abbadon1334](https://github.com/abbadon1334)

---

Top Contributors

[![juliusknorr](https://avatars.githubusercontent.com/u/3404133?v=4)](https://github.com/juliusknorr "juliusknorr (64 commits)")[![abbadon1334](https://avatars.githubusercontent.com/u/5801824?v=4)](https://github.com/abbadon1334 "abbadon1334 (58 commits)")[![luri-fr](https://avatars.githubusercontent.com/u/75742517?v=4)](https://github.com/luri-fr "luri-fr (9 commits)")[![stuba](https://avatars.githubusercontent.com/u/818066?v=4)](https://github.com/stuba "stuba (3 commits)")[![qury](https://avatars.githubusercontent.com/u/1764676?v=4)](https://github.com/qury "qury (2 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abbadon1334-phpdoc-to-rst/health.svg)

```
[![Health](https://phpackages.com/badges/abbadon1334-phpdoc-to-rst/health.svg)](https://phpackages.com/packages/abbadon1334-phpdoc-to-rst)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4753.9M23](/packages/coenjacobs-mozart)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

190406.5k30](/packages/brianhenryie-strauss)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[v.chetkov/php-clean-architecture

PHP Clean Architecture

14659.9k](/packages/vchetkov-php-clean-architecture)[phauthentic/cognitive-code-analysis

5212.8k](/packages/phauthentic-cognitive-code-analysis)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
