forked from getsentry/sentry-php
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
445 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# immobiliare/sentry-php | ||
|
||
[![Build Status](https://travis-ci.org/immobiliare/sentry-php.svg?branch=master)](https://travis-ci.org/immobiliare/sentry-php) | ||
[![Latest Stable Version](https://poser.pugx.org/immobiliare/sentry-php/v/stable?style=flat-square)](https://packagist.org/packages/immobiliare/sentry-php) | ||
[![Total Downloads](https://poser.pugx.org/immobiliare/sentry-php/downloads?style=flat-square)](https://packagist.org/packages/immobiliare/sentry-php) | ||
[![Latest Unstable Version](https://poser.pugx.org/immobiliare/sentry-php/v/unstable?style=flat-square)](https://packagist.org/packages/immobiliare/sentry-php) | ||
[![License](https://poser.pugx.org/immobiliare/sentry-php/license?style=flat-square)](https://packagist.org/packages/immobiliare/sentry-php) | ||
[![Monthly Downloads](https://poser.pugx.org/immobiliare/sentry-php/d/monthly?style=flat-square)](https://packagist.org/packages/immobiliare/sentry-php) | ||
[![Daily Downloads](https://poser.pugx.org/immobiliare/sentry-php/d/daily?style=flat-square)](https://packagist.org/packages/immobiliare/sentry-php) | ||
|
||
This project is a fork of official [PHP SDK v1.7](https://github.com/getsentry/sentry-php) for [Sentry](https://getsentry.com) to work even with php5.2. | ||
|
||
## Features | ||
|
||
- Automatically report (un)handled exceptions and errors | ||
- Send customized diagnostic data | ||
- Process and sanitize data before sending it over the network | ||
|
||
## Installation | ||
|
||
There are various ways to install the PHP integration for Sentry. The | ||
recommended way is to use [Composer](https://getcomposer.org). | ||
|
||
$ composer require immobiliare/sentry-php:1.7.x-dev | ||
|
||
Alternatively you can manually install it: | ||
|
||
1. Download and extract the latest [sentry-php](https://github.com/immobiliare/sentry-php/archive/master.zip>) archive to your PHP project. | ||
2. Require the autoloader in your application: | ||
|
||
```php | ||
require_once '/path/to/Raven/library/Raven/Autoloader.php'; | ||
Raven_Autoloader::register(); | ||
``` | ||
|
||
## Usage | ||
|
||
```php | ||
// Instantiate a new client with a compatible DSN and install built-in | ||
// handlers | ||
$sentryClient = new Raven_Client('https://e9ebbd88548a441288393c457ec90441:[email protected]/3235'); | ||
$sentryClient->install(); | ||
|
||
// Capture an exception | ||
$event_id = $sentryClient->captureException($ex); | ||
|
||
// Give the user feedback | ||
echo "Sorry, there was an error!"; | ||
echo "Your reference ID is " . $event_id; | ||
``` | ||
|
||
For more information, see the [documentation](https://docs.getsentry.com/hosted/clients/php/). | ||
|
||
|
||
## Integration with frameworks | ||
|
||
Other packages exists to integrate this SDK into the most common frameworks. | ||
|
||
- [Symfony](https://github.com/getsentry/sentry-symfony) | ||
- [Laravel](https://github.com/getsentry/sentry-laravel) | ||
|
||
|
||
## Community | ||
|
||
- [Documentation](https://docs.getsentry.com/hosted/clients/php/) | ||
- [Bug Tracker](https://github.com/immobiliare/sentry-php/issues) | ||
- [Code](https://github.com/immobiliare/sentry-php) | ||
|
||
|
||
Contributing | ||
------------ | ||
|
||
Dependencies are managed through composer: | ||
|
||
``` | ||
$ composer install | ||
``` | ||
|
||
Tests can then be run via phpunit: | ||
|
||
``` | ||
$ vendor/bin/phpunit | ||
``` |
Oops, something went wrong.