Download the PHP package rasuvaeff/doc-exec without Composer
On this page you can find all versions of the php package rasuvaeff/doc-exec. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rasuvaeff/doc-exec
More information about rasuvaeff/doc-exec
Files in rasuvaeff/doc-exec
Package doc-exec
Short Description Doctest for PHP: execute fenced code blocks from README/docs against the current codebase and diff the output
License BSD-3-Clause
Homepage https://github.com/rasuvaeff/doc-exec
Informations about the package doc-exec
rasuvaeff/doc-exec
Doctest for PHP: executes php doc-exec fenced code blocks from your README
against the current codebase and diffs the result. Catches doc-rot — code
examples that quietly stop matching the code they document — the way
cargo test --doc does for Rust.
Using an AI coding assistant? llms.txt contains a compact API reference you can share with the model.
Requirements
- PHP 8.3+
ext-tokenizernikic/php-parser^5.7 (a code block is split into statements by a real PHP parser, so every construct the language allows stays intact)
Installation
How it works
A fenced code block only runs when it opts in with the php doc-exec info
string — a bare `markdown
bash vendor/bin/doc-exec # zero-config: checks ./README.md vendor/bin/doc-exec docs/*.md # explicit file list vendor/bin/doc-exec --bootstrap=tests/bootstrap.php README.md # explicit autoloader vendor/bin/doc-exec --timeout=60 docs/slow.md # wall-clock budget per scope group vendor/bin/doc-exec --help "; $blocks = (new MarkdownExtractor())->extract($markdown, 'inline.md'); count($blocks); // => 1 bash docker run --rm -v "$PWD":/app -w /app composer:2 composer install docker run --rm -v "$PWD":/app -w /app composer:2 composer build docker run --rm -v "$PWD":/app -w /app composer:2 composer cs:fix docker run --rm -v "$PWD":/app -w /app composer:2 composer test docker run --rm -v "$PWD":/app -w /app composer:2 composer release-check bash make install make build make cs-fix make test make test-coverage make mutation make release-check
## License
[BSD-3-Clause](LICENSE.md)