PHPackages                             denosyscore/booboo - 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. denosyscore/booboo

ActiveLibrary

denosyscore/booboo
==================

Provides an error handler for PHP that can execute a stack of handlers for various purposes.

v1.0.3(2y ago)08MITPHPPHP ^8.0

Since Apr 4Pushed 2y agoCompare

[ Source](https://github.com/denosyscore/booboo)[ Packagist](https://packagist.org/packages/denosyscore/booboo)[ RSS](/packages/denosyscore-booboo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

BooBoo
======

[](#booboo)

Quality
-------

[](#quality)

[![Build Status](https://camo.githubusercontent.com/20aab59b07055c857173d37658272d75f861d18d877f04cf59a140803c80eb39/68747470733a2f2f7472617669732d63692e6f72672f7468657068706c65616775652f626f6f626f6f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/thephpleague/booboo)[![Code Climate](https://camo.githubusercontent.com/8e788713306f277e0140324c5afa435d2a3316c0e1210fe09b5f5ebe997a8ea5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7468657068706c65616775652f626f6f626f6f2f6261646765732f6770612e737667)](https://codeclimate.com/github/thephpleague/booboo)[![Test Coverage](https://camo.githubusercontent.com/cfa58025157e5e21f6b569294250e084f08b0b06627083d582535f8d472d4cb1/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7468657068706c65616775652f626f6f626f6f2f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/thephpleague/booboo)

Purpose
-------

[](#purpose)

An error handler for PHP that allows for the execution of handlers and formatters for viewing and managing errors in development and production. Because we all make mistakes.

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

[](#installation)

This library requires PHP 5.4 or later. One test is skipped against HHVM, but all others pass. BooBoo will support PHP 7 in a future release.

It is recommended that you install this library using Composer.

```
$ composer require league/booboo

```

BooBoo is compliant with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

Dependencies
------------

[](#dependencies)

BooBoo relies upon and requires the following dependencies:

- `psr/log` - A PSR-3 compliant interface for logging.

No other dependencies are required. The maintainer recommends installing [monolog](https://github.com/Seldaek/monolog) for logging.

Advantages Over Existing Solutions
----------------------------------

[](#advantages-over-existing-solutions)

BooBoo is designed to help make development easier while providing an integrated solution that can be deployed to your production environment. BooBoo offers the following advantages:

### Errors are non-blocking by default

[](#errors-are-non-blocking-by-default)

Some solutions throw exceptions for all errors, causing every notice to become a fatal error. BooBoo doesn't do this. Rather than raise an exception for non-fatal errors, we display the error to you in a way that makes sense and lets the program continue running. An `E_NOTICE` shouldn't become an exception.

The Runner object offers a method for forcing all errors to be blocking, should you wish to throw exceptions for more minor errors. This is turned off by default.

### BooBoo won't end up in your stack trace

[](#booboo-wont-end-up-in-your-stack-trace)

Because we don't throw an exception by default, we don't generate a stack trace for minor errors. This means BooBoo won't show up in your logs, and when it handles an exception generated elsewhere, it isn't appended there, either.

### BooBoo is built for logging

[](#booboo-is-built-for-logging)

This solution is designed with logging in mind, so that you can plug and play a [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) compliant logging solution in and go. BooBoo is sensitive enough to log errors, warnings and notices as such; exceptions are logged as critical, and `E_STRICT`/`E_DEPRECATED` warnings are logged as info. Handlers run even if formatting is disabled, so your logging will always be on, even in production.

### BooBoo is designed for extension

[](#booboo-is-designed-for-extension)

We can't possibly think through all your use cases, but we know you can. That's why we use standard interfaces to make it easy to extend and enhance the BooBoo functionality. (We also love pull requests; please share your innovations!)

### BooBoo is actively maintained

[](#booboo-is-actively-maintained)

PHP is changing every year, and BooBoo will change along with it.

Getting Started
---------------

[](#getting-started)

### Instantiation

[](#instantiation)

The main object that you need to instantiate is `Denosys\BooBoo\BooBoo`. This object takes care of setting the error handler, as well as handling errors and exceptions. It takes optional arguments during construction for handlers and formatters.

```
