PHPackages                             wn/mate - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. wn/mate

ActiveLibrary[Testing &amp; Quality](/categories/testing)

wn/mate
=======

A tool to generate documentation and tests from PHPDoc comments.

1.0.0(7y ago)2131MITPHPPHP &gt;=7.1

Since Jul 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/webNeat/mate)[ Packagist](https://packagist.org/packages/wn/mate)[ RSS](/packages/wn-mate/feed)WikiDiscussions master Synced 4d ago

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

Mate
====

[](#mate)

[![Build Status](https://camo.githubusercontent.com/24a463d8a90ba6780b495532e1a8dda6f0bfe1246f76466f74ae9ec324d507f8/68747470733a2f2f7472617669732d63692e6f72672f7765624e6561742f6d6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webNeat/mate)[![Coverage Status](https://camo.githubusercontent.com/8acca23811f275586a7eda0e5c9910095ea027688ba5151c1a5927651ac9020b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7765624e6561742f6d6174652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/webNeat/mate?branch=master)[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.me/webneat)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/webNeat/mate/blob/master/LICENSE)

Contents
========

[](#contents)

- [What is Mate?](#what-is-mate?)
- [Requirements](#requirements)
- [Installation](#installation)
- [Screenshots](#screenshots)
- [Command line options](#command-line-options)
- [Config File](#config-file)
- [Development Notes](#development-notes)

What is Mate?
=============

[](#what-is-mate)

**Mate** is a tool to generate documentation and tests from PHPDoc comments for functional libraries.

> What is a PHPDoc comment?

it's a comment like

```
/**
 * Description here.
 * @tag value
 * @other-tag some other value
 */
```

> Ok, and what do you mean by "functional library"?

I mean a group of [pure functoions](https://en.wikipedia.org/wiki/Pure_function) and type definitions. Testing pure functions is easy and can be done inside a comment. Testing a function which has side effects or a class that alters its internal state would be complicated and is not part of Mate features (yet?).

> Hmm, so you mean that I can't use Mate if my project contains classes or non-pure functions?

You can use Mate on any project to generate documentation and tests for your pure functions. This will not influence other parts of your project. Mate can also be used to watch changes on your source files and run `phpunit` whenever a file changes.

Requirements
============

[](#requirements)

- PHP 7.1+

Installation
============

[](#installation)

Install it as a dev dependency

```
composer require wn/mate --dev

```

Screenshots
===========

[](#screenshots)

[![Generating function tests](https://raw.githubusercontent.com/webneat/mate/master/docs/screenshots/tests.gif)](https://raw.githubusercontent.com/webneat/mate/master/docs/screenshots/tests.gif)

[![Generating function documentation](https://raw.githubusercontent.com/webneat/mate/master/docs/screenshots/docs.gif)](https://raw.githubusercontent.com/webneat/mate/master/docs/screenshots/docs.gif)

[![Generating type documentation](https://raw.githubusercontent.com/webneat/mate/master/docs/screenshots/types.gif)](https://raw.githubusercontent.com/webneat/mate/master/docs/screenshots/types.gif)

Command line options
====================

[](#command-line-options)

Running `mate --help` shows the command line options

```
Mate version 1.0.0-alpha

a tool to generate documentation and tests from PHPDoc comments.

Syntax: [options] configPath
Arguments:
    configPath string Path to the config file. (default: "mate.json")
Options:
    --dont-run-tests Don't run phpunit after the build.
    --watch Watch source files for changes.
    --no-cache Don't use cache. Should not be combined with --watch.
    --no-tests Don't generate test files.
    --no-docs Don't generate documentation files.

```

- **--dont-run-tests**: by default, Mate will run `phpunit` after each build or file change.
- **--watch**: with this option, Mate will watch the source files changes and generate the changed tests and docs. It will also run `phpunit` after each change.
- **--no-cache**: by default, Mate will create a file `mate.lock` and use it as cache. This helps when watching files for changes to not regenerate all tests and docs. Use this option if you don't want Mate to use the cache for same reason.

Config File
===========

[](#config-file)

Here is the default config file

```
{
  "srcDir": "src",
  "testsDir": "tests",
  "docsDir": "docs",
  "testCaseClass": "\\Wn\\Mate\\Classes\\TestCase",
  "cachePath": "mate.lock"
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2853d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2133333?v=4)[Amine Ben hammou](/maintainers/webNeat)[@webNeat](https://github.com/webNeat)

---

Top Contributors

[![webNeat](https://avatars.githubusercontent.com/u/2133333?v=4)](https://github.com/webNeat "webNeat (9 commits)")

### Embed Badge

![Health badge](/badges/wn-mate/health.svg)

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

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M32](/packages/jasonmccreary-laravel-test-assertions)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M775](/packages/typo3-testing-framework)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

76460.0k15](/packages/robiningelbrecht-phpunit-pretty-print)

PHPackages © 2026

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