PHPackages                             mamazu/documentation-validator - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. mamazu/documentation-validator

ActiveProject[Validation &amp; Sanitization](/categories/validation)

mamazu/documentation-validator
==============================

A validator tool that can validate markdown documentation

1.6.0(4y ago)97.8k↓43.8%2[1 issues](https://github.com/mamazu/documentation-parser/issues)3MITPHPPHP ^7.4|^8CI failing

Since Feb 23Pushed 9mo ago4 watchersCompare

[ Source](https://github.com/mamazu/documentation-parser)[ Packagist](https://packagist.org/packages/mamazu/documentation-validator)[ RSS](/packages/mamazu-documentation-validator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (10)Versions (14)Used By (3)

Documentation validator
=======================

[](#documentation-validator)

[![PHP Composer](https://github.com/mamazu/documentation-parser/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/mamazu/documentation-parser/actions/workflows/php.yml)

Every project needs documentation which is usually accompanied by code snippets that show how a component is integrated. The problem is how does the project ensure that this code runs and that the code is up to date? Then this is your tool.

Installation
------------

[](#installation)

**This is a dev only package. Installing it without dev dependencies will cause problems.**

`composer require --dev mamazu/documentation-validator`

`vendor/bin/doc-parser `

How to use it
-------------

[](#how-to-use-it)

```
bin/phpdoc-parser  [-i extensionscript.php]

path			Path containing the documentation
-i script.php	Configuration script of the application

Example:
bin/doc-parser docs					# Validate with default configuration
bin/doc-parser docs -i config.php	# Validate with custom configuration

```

The configuration of the extension is loaded before the application starts. For a template checkout the `tests/extensions/delete.php` file. An example for adding more validators is given in the `tests/extensions/add_phpstan.php` file which also adds the validation rules of [PHPstan](https://github.com/phpstan/phpstan).

Supported parsing formats
-------------------------

[](#supported-parsing-formats)

[Here](https://github.com/mamazu/documentation-parser/tree/master/src/Parser/Parser) is the full list of parsers that this library supports:

- IgnoredFileParser (this allows ignoring certain extensions like pdf files)
- Markdown (only supporting block comments for now)
- RstParser
- LatexParser (only supporting the `lstlisting` package)

Validators
----------

[](#validators)

- CompositeValidator: Validates all of its children passed into the constructor
- Bash:
    - BashValidator: Validates bash or sh files with the build in spellchecker
- PHP:
    - ClassExistenceValidator: Validates if the classes referenced in the use statement exist
    - PhpStanValidator (optional): Validates the code with PHPstan
    - EnvValidator: Validate the contents of the `.env` files
- XML:
    - XMLValidator: Checks if the document contains valid XML
- YAML / YML:
    - YamlValidator: Checks if the document contains valid Yaml
- JSON:
    - JsonValidator: Default PHP JSON parsing without line numbers of errors

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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 ~59 days

Recently: every ~7 days

Total

13

Last Release

1609d ago

PHP version history (3 changes)1.0.0PHP ^7.1

1.1.0PHP ^7.2

1.4.0PHP ^7.4|^8

### Community

Maintainers

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

---

Top Contributors

[![mamazu](https://avatars.githubusercontent.com/u/14860264?v=4)](https://github.com/mamazu "mamazu (127 commits)")[![lchrusciel](https://avatars.githubusercontent.com/u/6213903?v=4)](https://github.com/lchrusciel "lchrusciel (7 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mamazu-documentation-validator/health.svg)

```
[![Health](https://phpackages.com/badges/mamazu-documentation-validator/health.svg)](https://phpackages.com/packages/mamazu-documentation-validator)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[silverstripe/framework

The SilverStripe framework

7313.7M2.8k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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