sentry/sentry

A PHP client for Sentry (http://getsentry.com)


README

68747470733a2f2f73656e7472792d6272616e642e73746f726167652e676f6f676c65617069732e636f6d2f73656e7472792d6c6f676f2d626c61636b2e706e67

Sentry for PHP

Build Status Total Downloads Downloads per month Latest stable version License Scrutinizer Code Quality Code Coverage

The Sentry PHP error reporter tracks errors and exceptions that happen during the execution of your application and provides instant notification with detailed informations needed to prioritize, identify, reproduce and fix each issue. Learn more about automatic PHP error reporting with Sentry.

Features

  • Automatically report (un)handled exceptions and errors
  • Send customized diagnostic data
  • Process and sanitize data before sending it over the network

Usage

// Instantiate a new client with a compatible DSN and install built-in
// handlers
$client = (new Raven_Client('http://public:secret@example.com/1'))->install();

// Capture an exception
$event_id = $client->captureException($ex);

// Give the user feedback
echo "Sorry, there was an error!";
echo "Your reference ID is " . $event_id;

For more information, see our documentation.

Integration with frameworks

Other packages exists to integrate this SDK into the most common frameworks.

Official integrations

The following integrations are fully supported and maintained by the Sentry team.

3rd party integrations

The following integrations are available and maintained by members of the Sentry community.

Community

Contributing

Dependencies are managed through composer:

$ composer install

Tests can then be run via phpunit:

$ vendor/bin/phpunit

Tagging a Release

  1. Make sure CHANGES is up to date (add the release date) and master is green.

  2. Create a new branch for the minor version (if not present):

$ git checkout -b releases/1.9.x
  1. Update the hardcoded version tag in Client.php:
class Raven_Client
{
    const VERSION = '1.9.0';
}
  1. Commit the change:
$ git commit -a -m "1.9.0"
  1. Tag the branch:
git tag 1.9.0
  1. Push the tag:
git push --tags
  1. Switch back to master:
git checkout master
  1. Add the next minor release to the CHANGES file:
## 1.10.0 (unreleased)
  1. Update the version in Client.php:
class Raven_Client
{
    const VERSION = '1.10.x-dev';
}
  1. Lastly, update the composer version in composer.json:
    "extra": {
        "branch-alias": {
            "dev-master": "1.10.x-dev"
        }
    }

All done! Composer will pick up the tag and configuration automatically.