PHPackages                             soundasleep/phpdoc2 - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. soundasleep/phpdoc2

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

soundasleep/phpdoc2
===================

Parse PHP documentation blocks and generate HTML output

0.4.0(11y ago)0841PHP

Since Apr 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/soundasleep/phpdoc2)[ Packagist](https://packagist.org/packages/soundasleep/phpdoc2)[ RSS](/packages/soundasleep-phpdoc2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (9)Used By (0)

soundasleep/phpdoc2
===================

[](#soundasleepphpdoc2)

`soundasleep/phpdoc2` is another PHP documentation generator, but tries to be cleaner and smarter and more extensible than existing solutions.

For example, mark up your classes and methods with PHPDoc comment blocks:

```
namespace Openclerk\Currencies;

/**
 * A "currency" represents some unit of measurement that can
 * be converted into another "currency" unit, e.g. through an {@link Exchange}.
 * Can also cover commodities.
 *
 * This is the base interface; other interfaces will provide additional
 * functionality as necessary.
 */
interface Currency {

  /**
   * Get the unique three-letter currency code for this currency,
   * e.g. 'btc' or 'usd'. Must be lowercase. This is not visible to users.
   */
  public function getCode();

  /**
   * @return true if this can be considered a "cryptocurrency", e.g. "btc"
   */
  public function isCryptocurrency();

  // ...
}
```

Using
-----

[](#using)

```
php -f phpdoc2.php -- --directory "src/" --output "docs/"

```

For easy documentation generation, you can use Grunt with the [grunt-phpdoc2](https://github.com/soundasleep/grunt-phpdoc2) task. For example, see the example Gruntfile provided in the [phpdoc2-openclerk](https://github.com/soundasleep/phpdoc2-openclerk/blob/gh-pages/Gruntfile.coffee).

Templates
---------

[](#templates)

To override or extend these templates, add `--templates "dir"`. The generator will add this directory of templates to override the default ones. Uses [openclerk/pages](https://github.com/soundasleep/openclerk/pages), which means you can call subtemplates.

Demos
-----

[](#demos)

- [Openclerk](http://soundasleep.github.io/phpdoc2-openclerk/docs/index.html) - [source](https://github.com/soundasleep/phpdoc2-openclerk)
- [phpunit](http://soundasleep.github.io/phpdoc2-phpunit/docs/index.html) - [source](https://github.com/soundasleep/phpdoc2-phpunit)

Top-level tags supported
------------------------

[](#top-level-tags-supported)

- `@throws` *(Class)* *(description)*
- `@param` $name *(description)*
- `@return` description
- `@see` *(Class)* *(description)*
- `@deprecated` *(description)*

Inline tags supported
---------------------

[](#inline-tags-supported)

- `{@link http://foo.com}`
- `{@link Class}`, `{@link #method}, `{@link Class#method}`, `{@link Class description}`, `{@link Plural}s` etc
- `{@code ...}`

TODO
----

[](#todo)

- Look at compatibility with [phpdoc PSR standard](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md) and [reference PSR examples](https://github.com/soundasleep/phpdoc-psr)
- Method and class summaries should only display the first sentance of the 'title' doc
- Highlight abstract classes
- Display inherited abstract methods on abstract classes
- `@author` tag
- `@since` tag
- `@var` tag
- `@inheritDoc` inline tag - might be tricky
- Class variables
- Class constants
- Global functions support
- Global constants
- Option for `issue #123` to link to an external issue tracker
- Link through to open source projects for composer projects
- Link through to source code for GitHub projects

See also
--------

[](#see-also)

- [phpDox](http://phpdox.de/)
- [phpDocumentor](http://www.phpdoc.org/)
- [PHPDoc](http://www.phpdoc.de/)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Total

8

Last Release

4031d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ebbec5ccc867054461adebb7c5b6312f8256f989ef96b124892e6e89724afdb?d=identicon)[soundasleep](/maintainers/soundasleep)

---

Top Contributors

[![soundasleep](https://avatars.githubusercontent.com/u/3889656?v=4)](https://github.com/soundasleep "soundasleep (97 commits)")

### Embed Badge

![Health badge](/badges/soundasleep-phpdoc2/health.svg)

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

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[j0k3r/graby

Graby helps you extract article content from web pages

384349.6k2](/packages/j0k3r-graby)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[jolicode/automapper

JoliCode AutoMapper

213439.4k7](/packages/jolicode-automapper)[json-mapper/json-mapper

Map JSON structures to PHP classes

2181.1M22](/packages/json-mapper-json-mapper)[goaop/parser-reflection

Provides reflection information, based on raw source

1003.4M4](/packages/goaop-parser-reflection)

PHPackages © 2026

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