Download the PHP package bkrukowski/error-dumper without Composer
On this page you can find all versions of the php package bkrukowski/error-dumper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bkrukowski/error-dumper
More information about bkrukowski/error-dumper
Files in bkrukowski/error-dumper
Package error-dumper
Short Description Pretty errors and exceptions in PHP.
License MIT
Informations about the package error-dumper
Pretty error dumper for PHP
ErrorDumper has been moved to awesomite/error-dumper, please use new repository.
Requirements
- PHP >= 5.3 (also 7.0 is supported)
- no dependencies
- for nicer dump of variables you can add symfony/var-dumper to project
Tests
100% code coverage with PHPUnit.
Installation
If you use composer
Add bkrukowski/error-dumper to dependencies.
In other cases
Add below code to project:
Usage
[Unsafe] Below code is enough:
[Safe] But you should write something like this (because all variables like credentials are visible, when exception or error occur)
Editors
Numbers of lines and names of files are clickable, but you have to set proper editor. Default editor is PhpStorm. If you use something else, put edtor object as argument in registerErrorDumper
method.
Supported editors
- MacVim
- PhpStorm
- TextMate
Snapshots
Using below code, you can save exception somewhere and display it later:
Adding custom information to snapshots
From version 2.3.0 there is special constant ErrorDumper\Dumpers\Html::TAG_UNDER_TITLE
. You can put under title whatever you want using str_replace
function.
Handle only exceptions
You can choose type of errors to handling. Methods
ErrorDumper\Magic::registerErrorDumper
ErrorDumper\Magic::registerErrorCallback
ErrorDumper\Handlers\RegisterErrorHandler::register
have optional argument $errorTypes
, default is equal ErrorDumper\Handlers\RegisterErrorHandler::TYPE_ALL
.
This value is equal result of binary multiplication of constants ErrorDumper\Handlers\RegisterErrorHandler::TYPE_*
.
If you want handle only errors, you should put here ErrorDumper\Handlers\RegisterErrorHandler::TYPE_ERRORS | ErrorDumper\Handlers\RegisterErrorHandler::TYPE_SHUTDOWN_ERRORS
.