PHPackages                             bhenk/doc2rst - 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. bhenk/doc2rst

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

bhenk/doc2rst
=============

PHPDocs to reStructuredText generator

1.0.1(3y ago)015Apache-2.0PHPPHP &gt;=8.1

Since Mar 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bhenk/doc2rst)[ Packagist](https://packagist.org/packages/bhenk/doc2rst)[ Docs](https://github.com/bhenk/doc2rst)[ RSS](/packages/bhenk-doc2rst/feed)WikiDiscussions main Synced 1mo ago

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

[![Documentation Status](https://camo.githubusercontent.com/967b540c9cac3867b6131972e53d8118fe425b12c2b563ffd6f94c843c828489/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f646f63327273742f62616467652f3f76657273696f6e3d6c6174657374)](https://doc2rst.readthedocs.io/en/latest/?badge=latest)

PHPDoc to reStructuredText
==========================

[](#phpdoc-to-restructuredtext)

Doc2rst generates [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)from PHP-source trees. The generated reStructuredText than again can act as a source for [Sphinx](https://www.sphinx-doc.org/en/master/index.html), the versatile tool that builds -amongst others- html.

Doc2rst is written in PHP.
Requirement: php &gt;=8.1
Documentation:

Run as phar
-----------

[](#run-as-phar)

Download the [latest phar-file](https://github.com/bhenk/doc2rst/releases)and place it in your project root folder. Supposing your documentation folder is called *docs*, issue the quickstart command:

```
 ./doc2rst.phar -q ./docs

```

This will place 3 configuration files in your *docs* folder. Inspect and correct *docs/d2r-conf.php* than run

```
 ./doc2rst.phar -r ./docs

```

This will generate the reStructuredText files in your *docs/api* folder.

Run as requirement
------------------

[](#run-as-requirement)

As you probably only need doc2rst during development you can add the *–dev* option to the composer command:

```
 composer require --dev bhenk/doc2rst

```

Supposing your documentation folder is called *docs*, run quickstart to install the configuration files in your *docs* folder:

```
 $process = new ProcessManager("path/to/docs");
 $process->quickStart();

```

This will place 3 configuration files in your *docs* folder. Inspect and correct *docs/d2r-conf.php* than run

```
 $process = new ProcessManager("path/to/docs");
 $process->run();

```

This will generate the reStructuredText files in your *docs/api* folder.

Configuration
-------------

[](#configuration)

For a detailed discussion on configuration options see [run configuration (RC enum)](https://doc2rst.readthedocs.io/en/latest/api/bhenk/doc2rst/globals/RC/RC.html#rc).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~7 days

Total

3

Last Release

1135d ago

Major Versions

0.0.1-beta → 1.0.02023-03-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/11e089fa14b5a158ffe16fb3c97c81e019e8b7e61c4a079e751cc0e829d1d708?d=identicon)[bhenk](/maintainers/bhenk)

---

Top Contributors

[![bhenk](https://avatars.githubusercontent.com/u/22639225?v=4)](https://github.com/bhenk "bhenk (109 commits)")

---

Tags

documentationphpphpdocrestructuredtextsphinxsphinx-documentationreStructuredTextphpdocs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bhenk-doc2rst/health.svg)

```
[![Health](https://phpackages.com/badges/bhenk-doc2rst/health.svg)](https://phpackages.com/packages/bhenk-doc2rst)
```

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

704122.9M10.0k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31278.1M2.0k](/packages/illuminate-container)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[symfony/object-mapper

Provides a way to map an object to another object

34885.7k18](/packages/symfony-object-mapper)

PHPackages © 2026

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