This repository has been archived by the owner. It is now read-only.
[ABANDONED] Simple and independent PHP debug component compliant with PSR-1, PSR-2, PSR-4 and Composer
PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
.php-censor.yml
.travis.yml
LICENSE
README.md
composer.json
composer.lock
infection.json
phpunit.xml

README.md

PHP Censor Travis CI SensioLabs Insight Codecov Latest Version Total downloads License

This package is abandoned and no longer maintained. The author suggests using the symfony/debug package instead.

Nameless debug

Simple and independent PHP debug component compliant with PSR-1, PSR-2, PSR-4 and Composer.

Installation

You can install Nameless debug by composer. Add following code to "require" section of the composer.json:

"require": {
    "corpsee/nameless-debug": "<version>"
}

And install dependencies using the Composer:

cd path/to/your-project
composer install

Usage

Example of a simple way to use:

error_reporting(-1);

use Nameless\Debug\ErrorHandler;
use Nameless\Debug\ExceptionHandler;

$exception_handler = null;
if ($debug) {
    $exception_handler = (new ExceptionHandler())->register();
} else {
    set_exception_handler(function(\Exception $exception) {
        exit('Server error');
    });
}
$error_handler = (new ErrorHandler($exception_handler, $logger))->register();

Tests

You can run the unit tests with the following commands:

cd path/to/nameless-debug
./vendor/bin/phpunit

License

The Nameless debug is open source software licensed under the GPL-3.0 license.