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.4k↓50%2[1 issues](https://github.com/mamazu/documentation-parser/issues)3MITPHPPHP ^7.4|^8

Since Feb 23Pushed 7mo 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 1mo 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 89% of packages

Maintenance42

Moderate activity, may be stable

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

1563d 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

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/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.0k15.4k](/packages/prestashop-prestashop)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[jolicode/castor

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

53541.0k3](/packages/jolicode-castor)

PHPackages © 2026

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