PHPackages                             jbboehr/akashi - 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. jbboehr/akashi

ActiveLibrary

jbboehr/akashi
==============

Test PHP examples in Markdown through PHPUnit and PHPStan.

0320↑2637.5%PHPCI passing

Since Aug 8Pushed todayCompare

[ Source](https://github.com/jbboehr/akashi.php)[ Packagist](https://packagist.org/packages/jbboehr/akashi)[ RSS](/packages/jbboehr-akashi/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

[![Probatio Verborum Viventium『証』〜ＡＫＡＳＨＩ〜 — executable documentation testing for PHP](docs/pages/images/akashi-banner.png)](docs/pages/images/akashi-banner.png)

Akashi
======

[](#akashi)

[![Build](https://github.com/jbboehr/akashi.php/actions/workflows/ci.yml/badge.svg)](https://github.com/jbboehr/akashi.php/actions/workflows/ci.yml)[![Built with Nix](https://camo.githubusercontent.com/28fc308721537a40ce6e4d3fc4a5cd63d2e2151d560782cd628cf67cfc7d9399/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c74253230776974682d4e69782d3532373743333f6c6f676f3d6e69786f73266c6f676f436f6c6f723d7768697465)](flake.nix)[![License: AGPL-3.0-only WITH romic-exception](https://camo.githubusercontent.com/b3368cf44c4a32b17a318fd52be24253235cbf6aea2e473eaf0358dab7a44658/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4147504c2d2d332e302d2d6f6e6c7925323057495448253230726f6d69632d2d657863657074696f6e2d626c75652e737667)](LICENSE.md)[![AI burn](https://camo.githubusercontent.com/d6f65b565c14c1ff2ca5ec09832b59d3df4b8fcd37c62444ffabfb25b3cab15d/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246676973742e67697468756275736572636f6e74656e742e636f6d2532466a62626f65687225324634386565613034623761373361383463333937616638623964633535373535362532467261772532466167656e742d62616467652e6a736f6e2663616368655365636f6e64733d333030)](https://github.com/arlegotin/agent-badge)

Akashi turns PHP examples in Markdown documentation into executable tests. Write normal PHP examples in a README or documentation site, discover them as one corpus, and verify them through PHPUnit. Akashi runs examples in-process by default, reports failures against their documentation locations, and can reuse the same examples for PHPStan checks or explicit consumer-fixture extraction.

Put an ordinary PHP fence in `README.md` or another selected Markdown file:

```
$result = strtoupper('akashi');

assert($result === 'AKASHI');
```

This example is tested by Akashi in this repository.

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

[](#installation)

Akashi requires PHP 8.2 or later. Until the first tagged release, install the development branch with PHPUnit:

```
composer require --dev jbboehr/akashi:dev-master phpunit/phpunit:^11.5
```

Akashi supports the PHPUnit 10.5 and 11.5 release lines. The command above selects the current PHPUnit 11 integration; projects remaining on PHPUnit 10 may require `phpunit/phpunit:^10.5` instead.

Quick PHPUnit Usage
-------------------

[](#quick-phpunit-usage)

Create a PHPUnit test such as `tests/DocumentationExamplesTest.php`:

```
