Download the PHP package wn/mate without Composer
On this page you can find all versions of the php package wn/mate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package mate
Short Description A tool to generate documentation and tests from PHPDoc comments.
License MIT
Informations about the package mate
Mate
Contents
- What is Mate?
- Requirements
- Installation
- Screenshots
- Command line options
- Config File
- Development Notes
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
Ok, and what do you mean by "functional library"?
I mean a group of pure functoions 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
- PHP 7.1+
Installation
Install it as a dev dependency
Screenshots
Command line options
Running mate --help
shows the command line options
- --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
Here is the default config file
All versions of mate with dependencies
tarsana/functional Version ^2.2
phpunit/phpunit Version ^7.0
tarsana/command Version ^1.2