PHPackages                             mathiasverraes/uptodocs - 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. mathiasverraes/uptodocs

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

mathiasverraes/uptodocs
=======================

UpToDocs scans a Markdown file for PHP code blocks, and executes each one in a separate process. Include this in your CI workflows, to make sure your documentation is always up to date with your code.

1.0.3(5y ago)619691[2 PRs](https://github.com/mathiasverraes/uptodocs/pulls)2MITPHPPHP ^7.4

Since Jun 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mathiasverraes/uptodocs)[ Packagist](https://packagist.org/packages/mathiasverraes/uptodocs)[ Docs](https://github.com/mathiasverraes/uptodocs)[ RSS](/packages/mathiasverraes-uptodocs/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (3)Versions (7)Used By (2)

UpToDocs
========

[](#uptodocs)

UpToDocs scans a Markdown file for PHP code blocks, and executes each one in a separate process.

Include this in your CI workflows, to make sure your documentation is always up to date with your code.

Usage
-----

[](#usage)

```
composer require --dev mathiasverraes/uptodocs

```

CLI:

```
vendor/bin/uptodocs run [options] [--]

Arguments:
  markdownFile          Markdown file to run.

Options:
  -b, --before=BEFORE   A PHP file to run before each code block.
                        Useful for imports and other setup code.
  -a, --after=AFTER     A PHP file to run after each code block.
                        Useful for cleanup, and for running assertions.

```

In your code:

```
