PHPackages                             jwread/lib-allure - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jwread/lib-allure

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jwread/lib-allure
=================

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight. API Docs are here; http://jamesread.github.io/libAllure/

8.3.0(5mo ago)21.1k[1 PRs](https://github.com/jamesread/libAllure/pulls)1GPL-2.0-onlyPHPCI passing

Since Oct 30Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/jamesread/libAllure)[ Packagist](https://packagist.org/packages/jwread/lib-allure)[ Docs](https://github.com/jamesread/libAllure)[ RSS](/packages/jwread-lib-allure/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (87)Used By (1)

libAllure
=========

[](#liballure)

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

[packagist.org Package](https://packagist.org/packages/jwread/lib-allure) for compose | [API Documentation](http://jamesread.github.io/libAllure/)

[![Maturity Badge](https://camo.githubusercontent.com/7646fd8923ce6e98e58e932d6e09ca60aa6c2de28f0ce4e5b362a68615412582/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d617475726974792d50726f64756374696f6e2d627269676874677265656e)](#none)[![Release Pipeline](https://github.com/jamesread/libAllure/actions/workflows/php.yml/badge.svg)](https://github.com/jamesread/libAllure/actions/workflows/release.yml)

Compatibiility
--------------

[](#compatibiility)

Up to PHP 5.5.xUp tp PHP 7.3PHP 8libAllure 1.xsupportednot supportednot supportedlibAllure 2.xnot supportedsupportednot supportedlibAllure 8.xnot supportednot supportedsupportedAdding with `composer`
----------------------

[](#adding-with-composer)

You can add libAllure to your project quickly, if you're using composer.

```
composer require jwread/lib-allure

```

Then to use it, like in test.php;

```

```

Adding with a standard PHP include
----------------------------------

[](#adding-with-a-standard-php-include)

Copy the contents of `/src/main/php/` to somewhere on your include path, like `/usr/share/php/` on most Linux distributions. So that you have `/usr/share/php/libAllure/ErrorHander.php`, `/usr/share/php/libAllure/Database.php`, etc.

API Examples &amp; Quick Reference
----------------------------------

[](#api-examples--quick-reference)

**Full API Documentation**:

### Database

[](#database)

Wrapper around **PDO**.

```
use \libAllure\Database;

$database = new Database('mysql:dbname=testdb;host=127.0.0.1', 'username', 'password');

$sql = 'SELECT p.id, p.title FROM products p';
$results = $database->prepare($sql)->execute();

var_dump($results->fetchAll());
```

### ErrorHandler

[](#errorhandler)

Custom error handler that complains at the slightest thing, makes debugging nice and easy.

```
use \libAllure\ErrorHandler;

$handler = new ErrorHandler();
$handler->beGreedy();

throw new Exception('This is a test');
```

### Form

[](#form)

Custom form handling code.

```
use \libAllure\ElementInput;
use \libAllure\Template;

$tpl = new Template('myTemplates'); // requires form.tpl and formElements.tpl in your templates folder

class MyForm extends \libAllure\Form {
	public function __construct() {
		$this->addElement(new ElementInput('forename', 'Forename', 'My Default Name');
		$this->addDefaultButtons():
	}

	public function process() {
		// do something
	}
}

$f = new MyForm();

if ($f->validate()) {
	$f->process();
}

$tpl->displayForm($f);
```

### Template

[](#template)

Just a nice wrapper around Smarty2/3, that adds in a few compatibility functions to easily switch between the versions.

```
use \libAllure\Template;

$tpl = new Template('myTemplates');
$tpl->display('myTemplate.tpl');
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance75

Regular maintenance activity

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~82 days

Total

82

Last Release

167d ago

Major Versions

1.2.4 → 2.0.02022-01-11

2.0.5 → 8.0.02022-12-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/989a1b16b95e54e8a5d71067177f781c77503c87bd9df9d052cc78a05c11f8d6?d=identicon)[jamesread](/maintainers/jamesread)

---

Top Contributors

[![jamesread](https://avatars.githubusercontent.com/u/2025715?v=4)](https://github.com/jamesread "jamesread (199 commits)")

---

Tags

libmaturity-prodshimwrapper

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jwread-lib-allure/health.svg)

```
[![Health](https://phpackages.com/badges/jwread-lib-allure/health.svg)](https://phpackages.com/packages/jwread-lib-allure)
```

###  Alternatives

[nzedb/nzedb

A Usenet Indexer

6415.4k](/packages/nzedb-nzedb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
