Download the PHP package hanneskod/exemplify without Composer
On this page you can find all versions of the php package hanneskod/exemplify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hanneskod/exemplify
More information about hanneskod/exemplify
Files in hanneskod/exemplify
Package exemplify
Short Description Validate code examples in readme files
License Unlicense
Homepage https://github.com/hanneskod/readme-tester
Informations about the package exemplify
Readme-Tester
Validate PHP code examples in documentation.
This file describes version
2
which uses php8 attributes.For version
1
which uses docblock style annotations see this link.
Why?
Did you update your library, but forgot to update code examples in README? Are your users complaining on syntax errors in your examples? Do you find it too cumbersome to manually test all examples? Readme-Tester lets you automate the process of validating PHP code examples in documentation files.
A simple example
Readme-Tester uses php8 style attributes inside HTML-comments (to make them invisible after rendering on for example github) to specify the expected result of a code example.
The following simple example asserts that the code outputs content.
<!--
#[ReadmeTester\ExpectOutput('/foo/')]
-->
For more information read the documentation.
Installation
Using phive (recommended)
Install using phive
As a phar archive
Download the latest phar archive from the releases tab.
Optionally rename readme-tester.phar
to readme-tester
for a smoother experience.
Using composer
Install as a composer dependency
This will make readme-tester
avaliable as vendor/bin/readme-tester
.
From source
To build you need make
The build script uses composer to handle dependencies and phive to
handle build tools. If they are not installed as composer
or phive
respectivly you can use something like
Getting started
Using the command line tool is as simple as
For more detailed information use
All versions of exemplify with dependencies
amphp/parallel-functions Version ^1
crell/tukio Version ^1
fig/event-dispatcher-util Version ^1
psr/container Version ^1
psr/event-dispatcher Version ^1
symfony/console Version ^5
symfony/dependency-injection Version ^5
symfony/finder Version ^5
symfony/process Version ^5
symfony/yaml Version ^5