Download the PHP package exs/error-bundle without Composer
On this page you can find all versions of the php package exs/error-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package error-bundle
Symfony 2.x ErrorBundle
Error bundle to log 4xx and 5xx errors and exceptions in the database.
Bundle is installed as a service listening for all 4xx and 5xx http exceptions and logs them in the database. When used in conjunction with a crontab enabled monitor we can then alert the dev team when there are hightened number of errors on the site and issue a rapid fix if necessary.
Installing the ErrorBundle in a new Symfony2 project
So the ErrorBundle is ready for installation, great news but how do we install it. The installation process is actually very simple. Set up a new Symfony2 project with Composer.
Require from the command line directly:
Once the new project is set up, open the composer.json file and add the exs/error-bundle as a dependency:
Save the file and have composer update the project via the command line:
Composer will now update all dependencies and you should see our bundle in the list:
Now just update the app/AppKernel.php and app/config/routing.yml to include our bundle, clear the cache and update the schema:
add routing.yml:
add the bundle to orm configuration:
add deprecated errors params:
clear cache and update database:
and now you're done.
You can test that it works by throwing 500 and 400 series errors from your app. The errors will be logged (along with useful debugging information) in your database in the following tables:
-
exception4xx
- exception5xx
If you wish to test the exceptions being thrown via the included controller you can try the following routes
If you want to test the console exceptions try:
Contributing
Anyone and everyone is welcome to contribute.
If you have any questions or suggestions please let us know.