2017 © Pedro Peláez
 

behat-extension error-extension

Fatal error handling extension for Behat

image

rmiller/error-extension

Fatal error handling extension for Behat

  • Sunday, February 19, 2017
  • by mr_r_miller
  • Repository
  • 2 Watchers
  • 7 Stars
  • 18,854 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

ErrorExtension

Scrutinizer Code Quality Build Status, (*1)

Behat extension to provide formatted error messages for fatal errors., (*2)

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., (*3)

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., (*4)

Installation

This extension requires:, (*5)

  • Behat 3.0+
  • PHP 5.4+

The easiest way to install it is to use Composer, (*6)

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

Activate the extension by specifying its class in your behat.yml:, (*7)

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

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:, (*8)

namespace RMiller\BehatSpec\Extension\ErrorExtension\Observer;

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

and be tagged with rmiller.error_listener in the service configuration., (*9)

Currently this is used by the PhpSpecExtension to trigger running PhpSpec commands on relevant errors., (*10)

The Versions

19/02 2017

dev-master

9999999-dev https://github.com/richardmiller/ErrorExtension

Fatal error handling extension for Behat

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd behat

24/01 2017

0.5.0

0.5.0.0 https://github.com/richardmiller/ErrorExtension

Fatal error handling extension for Behat

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd behat

24/01 2017

0.4.0

0.4.0.0 https://github.com/richardmiller/ErrorExtension

Fatal error handling extension for Behat

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd behat

24/01 2017

0.4.1

0.4.1.0 https://github.com/richardmiller/ErrorExtension

Fatal error handling extension for Behat

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd behat

04/11 2014

0.1.0

0.1.0.0 https://github.com/richardmiller/ErrorExtension

Fatal error handling extension for Behat

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd behat