Download the PHP package withfatpanda/bugsnag-mini-php without Composer

On this page you can find all versions of the php package withfatpanda/bugsnag-mini-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 bugsnag-mini-php

bugsnag-mini-php

This is the most minimal PHP client for Bugsnag that I could conceive of and create.

I wanted to be able to add Bugsnag to an aging PHP codebase I'm working on, but for various reasons, I couldn't easily incorporate the standard PHP library. Fortunately, Bugsnag has an easy to approach JSON API, so I put this client together, and now you can use it too!

Getting Started

If you're adding this to a project that doesn't use Composer, just download this repository, and copy the file src/busnag-mini.php into your project.

If you're using Composer, you can incorporate this snip of PHP like a library as follows:

The next thing you'll need to do is create a constant somewhere to store your Bugsnag API key:

The last and most important step is to hook up this client's exception and error handling functions, like so:

Now anytime an Exception is thrown or an error is raised or the runtime shutsdown, errors will be sent to Bugsnag.

Customizing Meta Data

You can feed more meta data into Bugsnag by setting up functions that assess the context of the error and provide more context. You can, for example, attach information about affected user, about the app, about the device running the app, and other meta data.

Each of the functions receives as their only argument the Exception that was thrown and is being reported upon.

These functions do not exist until you define them in your own codebase. The client will look for them, and will call them only if they exist—this is completely and totally optional.

The functions are as follows:

bugsnag_mini_user

Information about the user affected by the crash.

bugsnag_mini_app

Information about the app that crashed.

bugsnag_mini_device

Information about the computer/device running the app

bugsnag_mini_meta

An object containing any further data you wish to attach to this error event. This should contain one or more objects, with each object being displayed in its own tab on the event details on the Bugsnag website.

Sending errors manually

If ever you want to push an Exception arbitrarily, all you have to do is call bugsnag_mini_notify($ex). For example:

Running the unit test

To ease development and testing, I put together a simple PHPUnit-based test. To run it, you'll want to edit phpunit.xml, uncomment and modify the following section to suit:

This won't actually halt the runtime.

About Fat Panda

Fat Panda is a software product consultancy located in Winchester, VA. We specialize in Laravel, WordPress, and Ionic. No matter where you are in the development of your product, we'll meet you there and work with you to propel you forward.

Contributing

If you run into a problem using this framework, please open an issue.

If you want to help make this framework amazing, check out the help wanted list.

If you'd like to support this and the other open source projects Fat Panda is building, please join our community of supporters on Patreon.


All versions of bugsnag-mini-php with dependencies

PHP Build Version
Package Version
No informations.
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 withfatpanda/bugsnag-mini-php contains the following files

Loading the files please wait ....