Download the PHP package rmiller/error-extension without Composer
On this page you can find all versions of the php package rmiller/error-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rmiller/error-extension
More information about rmiller/error-extension
Files in rmiller/error-extension
Package error-extension
Short Description Fatal error handling extension for Behat
License MIT
Homepage https://github.com/richardmiller/ErrorExtension
Informations about the package error-extension
ErrorExtension
Behat 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
This extension requires:
- Behat 3.0+
- PHP 5.4+
The easiest way to install it is to use Composer
Activate the extension by specifying its class in your behat.yml
:
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:
and be tagged with rmiller.error_listener
in the service configuration.
Currently this is used by the PhpSpecExtension to trigger running PhpSpec commands on relevant errors.