PHPackages                             klitsche/dog - 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. [Templating &amp; Views](/categories/templating)
4. /
5. klitsche/dog

ActiveLibrary[Templating &amp; Views](/categories/templating)

klitsche/dog
============

Source code documentation generator for PHP libraries

v0.5.0(3y ago)27.7k2MITPHPPHP ^8.0CI failing

Since Jul 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/klitsche/dog)[ Packagist](https://packagist.org/packages/klitsche/dog)[ Docs](https://klitsche.github.io/dog/)[ RSS](/packages/klitsche-dog/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (7)Dependencies (11)Versions (8)Used By (2)

[![logo](docs/img/dog.png)](docs/img/dog.png) Dog
=================================================

[](#-dog)

[![Build Status](https://github.com/klitsche/dog/actions/workflows/test.yml/badge.svg)](https://github.com/klitsche/dog/actions/workflows/test.yml)[![Test Coverage](https://camo.githubusercontent.com/bca848864de494bb76eb1d4e8a8d6525de74727cc798e0ba5bbd4d403a7ef045/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32353438653863623261613663666232633962372f746573745f636f766572616765)](https://codeclimate.com/github/klitsche/dog/test_coverage)[![Maintainability](https://camo.githubusercontent.com/24040fa5b6a405a2494abcc5755cfe7936d6faef8a1508da015248046776c407/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32353438653863623261613663666232633962372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/klitsche/dog/maintainability)[![Packagist](https://camo.githubusercontent.com/960b9234f03a19eb08a4ac2a760b1d01bc85a259351ce27aa231f70d0c808cc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6c6974736368652f646f67)](https://packagist.org/packages/klitsche/dog)

Dog is a slim source code documentation generator for PHP libraries. It´s a thin layer around [phpdocumentor/reflection](https://github.com/phpDocumentor/reflection) and [twig](https://github.com/twigphp/Twig).

**WIP**: Expect breaking changes along all 0.\* pre-releases.

Features
--------

[](#features)

- Easily generates source code documentation
- Looks into code and phpdoc
- Helps to optimize code and phpdoc for documentation with customizable rules (based on [proposed PSR-19](https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md))
- Outputs markdown (e.g. for use with [mkdocs-material](https://github.com/squidfunk/mkdocs-material))
- Analyzes source code PHP ^5.2
- Provides support for custom printer logic &amp; easy templating (planned)
- Provides support for custom enricher logic to add relevant &amp; related data

Runtime Requirements
--------------------

[](#runtime-requirements)

- PHP ^8.0

Suggested:

- json extension to enrich `phploc` data
- simplexml extension to enrich `clover` coverage data

Quick Start
-----------

[](#quick-start)

Add to your project:

```
composer require --dev klitsche/dog

```

Create config file `.dog.yml` in your project root directory and edit it.

Example:

```
# Title of index page
title: 'Overview'
# Relative or absolute paths to source files - plus patterns to include or exclude path pr files
srcPaths:
  'src':
    '/.*\.php$/': true
# Add new or change validation rules - omit completely to use default set
rules:
  PublicFileDocBlockMissingRule:
    class: 'Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule'
    issueLevel: 'ignore'
    match:
      getElementType: 'File'
# Configure enrichers to add extra data to project or element items
enrichers:
  clover:
    class: \Klitsche\Dog\Enrichers\Clover\CloverEnricher
    file: clover.xml
# FQCN for template printer class
printerClass: 'Klitsche\Dog\Printer\Markdown\Printer'
# Relative or absolute path to output directory
outputDir: 'docs/api'
# Enable or disable debug mode - helps when tweaking templates
debug: false
```

Analyze code and phpdoc first, then generate documentation:

```
vendor/bin/dog

```

Analyze code &amp; phpdoc and find potential documentation issues without generating documentation:

```
vendor/bin/dog --analyze

```

Generate documentation without analyzing it first:

```
vendor/bin/dog --generate

```

Documentation
-------------

[](#documentation)

Todos
-----

[](#todos)

- Add code style checks
- Add GitHub actions
- Add cmd interface for dog bin
- Add validation rules
- Add documentation (mkdocs, github page)
- Add tests
- Add support for printer config - eg. templatePath
- Add phar packaging
- Improve description printing - (inheritDoc, inline tags, ...)
- Add direct element interface for [proposed PSR-19 tags](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc-tags.md)
- Add phive packaging

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.1% 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 ~154 days

Recently: every ~197 days

Total

7

Last Release

1212d ago

PHP version history (2 changes)v0.3PHP ^7.4 || ^8.0

v0.5.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b53d403fce38ae29e4d8368820988c0e4c936193655d95dd7e06b533099a1bee?d=identicon)[dirx](/maintainers/dirx)

---

Top Contributors

[![dirx](https://avatars.githubusercontent.com/u/795259?v=4)](https://github.com/dirx "dirx (102 commits)")[![Zerogiven](https://avatars.githubusercontent.com/u/389319?v=4)](https://github.com/Zerogiven "Zerogiven (3 commits)")

---

Tags

apiphpdoctwigdocumentationgeneratormarkdownsource-code

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/klitsche-dog/health.svg)

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

###  Alternatives

[phpdocumentor/phpdocumentor

Documentation Generator for PHP

4.4k3.1M878](/packages/phpdocumentor-phpdocumentor)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)

PHPackages © 2026

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