PHPackages                             rmiller/error-extension - 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. rmiller/error-extension

ActiveBehat-extension[Testing &amp; Quality](/categories/testing)

rmiller/error-extension
=======================

Fatal error handling extension for Behat

0.5.0(9y ago)721.3k2[2 issues](https://github.com/richardmiller/ErrorExtension/issues)2MITPHPPHP &gt;=5.4

Since Nov 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/richardmiller/ErrorExtension)[ Packagist](https://packagist.org/packages/rmiller/error-extension)[ Docs](https://github.com/richardmiller/ErrorExtension)[ RSS](/packages/rmiller-error-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (2)

ErrorExtension
==============

[](#errorextension)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e3250e7a932441d1845fbcd02da080fc920063c22e551f5264dcdadfc7bad8b2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726963686172646d696c6c65722f4572726f72457874656e73696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/richardmiller/ErrorExtension/?branch=master)[![Build Status](https://camo.githubusercontent.com/31e779ac01da62040e71a8b175f595c8b89c30dd7e9b23828e754eb0f0dff2a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726963686172646d696c6c65722f4572726f72457874656e73696f6e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/richardmiller/ErrorExtension/build-status/master)

[Behat](http://docs.behat.org/en/v3.0/) extension to provide formatted error messages for fatal errors.

This stops the large stack traces appearing on every fatal error. Instead a simpler formatted error showing the error message, file and line number is shown. If you need the full stack trace then they will still appear when Behat is run with the verbose flag.

Since this does work in the shutdown function there is a good chance things will go horribly wrong if there are any errors/exceptions in handing the errors. It's an extension to a dev tool though so this is not that worth worrying about.

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

[](#installation)

This extension requires:

- Behat 3.0+
- PHP 5.4+

The easiest way to install it is to use Composer

```
$ composer require --dev rmiller/error-extension:^0.5

```

Activate the extension by specifying its class in your `behat.yml`:

```
# behat.yml
default:
  # ...
  extensions:
    RMiller\BehatSpec\Extension\ErrorExtension\ErrorExtension: ~
```

Error Observers
---------------

[](#error-observers)

Observers can be registered for the errors to handle them in some way from another Behat extension. These must implement the following interface:

```
namespace RMiller\BehatSpec\Extension\ErrorExtension\Observer;

interface ErrorObserver
{
    public function notify(array $error);
}
```

and be tagged with `rmiller.error_listener` in the service configuration.

Currently this is used by the [PhpSpecExtension](https://github.com/richardmiller/PhpSpecExtension)to trigger running PhpSpec commands on relevant errors.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.1% 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 ~271 days

Total

4

Last Release

3397d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/442882d0e62a3acd7f3480cc8a07beeb3098dadbaaecb501eea945374ce55e1b?d=identicon)[mr\_r\_miller](/maintainers/mr_r_miller)

---

Top Contributors

[![ek9](https://avatars.githubusercontent.com/u/17393048?v=4)](https://github.com/ek9 "ek9 (11 commits)")[![pocky](https://avatars.githubusercontent.com/u/204451?v=4)](https://github.com/pocky "pocky (7 commits)")

---

Tags

BDDBehat

### Embed Badge

![Health badge](/badges/rmiller-error-extension/health.svg)

```
[![Health](https://phpackages.com/badges/rmiller-error-extension/health.svg)](https://phpackages.com/packages/rmiller-error-extension)
```

###  Alternatives

[sensiolabs/behat-page-object-extension

Page object extension for Behat

1166.5M27](/packages/sensiolabs-behat-page-object-extension)[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M12](/packages/laracasts-behat-laravel-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[bex/behat-extension-driver-locator

Driver locator tool for behat extensions

385.2M4](/packages/bex-behat-extension-driver-locator)[ciaranmcnulty/behat-stepthroughextension

Extension for behat to help debug failing scenarios

601.6M5](/packages/ciaranmcnulty-behat-stepthroughextension)[soyuka/contexts

Behatch contexts

282.1M11](/packages/soyuka-contexts)

PHPackages © 2026

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