Download the PHP package o0khoiclub0o/honeybadger-php without Composer

On this page you can find all versions of the php package o0khoiclub0o/honeybadger-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package honeybadger-php

honeybadger-php Build Status

honeybadger-php is an unofficial library for reporting application errors to Honeybadger.

Compatibility

honeybadger-php is developed and tested against PHP versions 5.3 and 5.4.

Standalone Installation

Add honeybadger-php to your composer.json:

Then configure Honeybadger in your bootstrap/index.php/initializers:

Your application will then report unhandled errors and exceptions to Honeybadger. That's it!

Slim Installation

Add honeybadger-php to your composer.json:

Call Honeybadger\Slim::init() after your application definition:

Additional Integrations

This library will work well by following the standalone installation steps outlined above. However, if you want to integrate your favorite framework, you can use the Slim integration as a reference. If you've written your own integration that you'd like to share, send a pull request adding it to the list:

Usage

For the most part, Honeybadger works for itself.

It intercepts unhandled errors and uncaught exceptions and sends notifications.

If you want to log arbitrary things which you've caught yourself, you can do something like this:

The ::notify() call will send the notice over to Honeybadger for later analysis.

Ignored Environments

Please note that in development mode, Honeybadger will not be notified of exceptions that occur. In production, make sure you sure you set the environment name for Honeybadger. For apps using the Slim integration, Honeybadger will handle this for you by using your app's configured mode:

You can modify which environments are ignored by setting the development_environments option in your Honeybadger initializer:

If you choose to override the development_environments option for whatever reason, please make sure your test environments are ignored.

Sending Custom Data

Honeybadger allows you to send custom data using Honeybadger::context(). Here's an example of sending some user-specific information in a Slim callback:

Now whenever an error occurs, Honeybadger will display the affected user's ID and email address, if available.

Subsequent calls to ::context() will merge the existing array with any new data, so you can effectively build up context throughout your request's life cycle.

Going Beyond Exceptions

You can also pass an array to the Honeybadger::notify() method and store whatever you want, not just an exception, anywhere in your app.

Honeybadger::notify() will get all the information about the error itself. As for an array, these are the keys you should pass:

Honeybadger merges the array you pass with these default options:

You can override any of those parameters.

Sending shell environment variables when "Going beyond exceptions"

One common request we see is to send shell environment variables along with manual exception notification. We recommend sending them along with CGI data or Rack environment (:cgi_data or :rack_env keys, respectively.)

See Honeybadger::Notice::__construct in lib/Honeybadger/Notice.php for more details.

Filtering

You can specify a whitelist of errors that Honeybadger will not report on. Use this feature when you are so apathetic to certain errors that you don't want them even logged.

This filter will only be applied to automatic notifications, not manual notifications (when ::notify() is called directly).

To ignore errors, specify their names in your Honeybadger configuration block:

To ignore only certain errors (and override the defaults), use the ignore_only() method:

Subclasses of ignored classes will also be ignored.

To ignore certain user agents, add in the ignore_user_agent attribute:

To ignore exceptions based on other conditions, use ignore_by_filter:

To replace sensitive information sent to the Honeybadger service with [FILTERED] use params_filters:

To disable sending session data:

Proxy Support

The notifier supports using a proxy, if your server is not able to directly reach the Honeybadger servers. To configure the proxy settings, add the following information to your Honeybadger configuration.

Troubleshooting

TODO

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Credits

The majority of this library's style, API, documentation, and structure directly follows the amazing honeybadger-ruby gem.

License

MIT Licensed. See LICENSE.txt for details.


All versions of honeybadger-php with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.3.0
guzzle/guzzle Version >= 3.0, < 3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package o0khoiclub0o/honeybadger-php contains the following files

Loading the files please wait ....