<commit_before>Raygun4PHP
==========

[Raygun.com](http://raygun.com) provider for PHP 7.1+

_See [v1.8 documentation](https://github.com/MindscapeHQ/raygun4php/blob/1.8/README.md) for PHP v5.3+ support_

[![Build
Status](https://secure.travis-ci.org/MindscapeHQ/raygun4php.png?branch=master)](http://travis-ci.org/MindscapeHQ/raygun4php)

## Installation

Firstly, ensure that **curl** is installed and enabled in your server's php.ini file.

### With Composer

Composer is a package management tool for PHP which automatically fetches dependencies and also supports autoloading - this is a low-impact way to get Raygun4PHP into your site.

1\. If you use a *nix environment, [follow the instructions](http://getcomposer.org/doc/01-basic-usage.md#installation) to install Composer. Windows users can run [this installer](https://github.com/johnstevenson/composer-setup) to automatically add it to the Path.

2\. Inside your project's root directory create a composer.json file, containing:

```json
{
    "require": {
        "mindscape/raygun4php": "^2.0"
    }
}
```

3\. From your shell run `php composer.phar install` (*nix) or `composer install` (Windows). This will download Raygun4PHP and create the appropriate autoload data.

4\. Then in a PHP file just add:
```php
require_once 'vendor/autoload.php';
```
and the library will be imported ready for use.

## Usage

You can automatically send both PHP errors and object-oriented exceptions to Raygun. The RaygunClient requires an HTTP transport (e.g. [Guzzle](http://docs.guzzlephp.org/), [UniRest](http://unirest.io/php.html), etc.).

There are Guzzle-based asynchronous and synchronous transport classes in the provider, or you can use your own.

### Asynchronous transport

This is an example of basic usage for asynchronous sending of errors and exceptions:

```php
<?php
namespace {
    require_once 'vendor/autoload.php';

    use GuzzleHttp\Client;<commit_msg>Replace UniRest with PSR-7 compatible interface<commit_after>Raygun4PHP
==========

[Raygun.com](http://raygun.com) provider for PHP 7.1+

_See [v1.8 documentation](https://github.com/MindscapeHQ/raygun4php/blob/1.8/README.md) for PHP v5.3+ support_

[![Build
Status](https://secure.travis-ci.org/MindscapeHQ/raygun4php.png?branch=master)](http://travis-ci.org/MindscapeHQ/raygun4php)

## Installation

Firstly, ensure that **curl** is installed and enabled in your server's php.ini file.

### With Composer

Composer is a package management tool for PHP which automatically fetches dependencies and also supports autoloading - this is a low-impact way to get Raygun4PHP into your site.

1\. If you use a *nix environment, [follow the instructions](http://getcomposer.org/doc/01-basic-usage.md#installation) to install Composer. Windows users can run [this installer](https://github.com/johnstevenson/composer-setup) to automatically add it to the Path.

2\. Inside your project's root directory create a composer.json file, containing:

```json
{
    "require": {
        "mindscape/raygun4php": "^2.0"
    }
}
```

3\. From your shell run `php composer.phar install` (*nix) or `composer install` (Windows). This will download Raygun4PHP and create the appropriate autoload data.

4\. Then in a PHP file just add:
```php
require_once 'vendor/autoload.php';
```
and the library will be imported ready for use.

## Usage

You can automatically send both PHP errors and object-oriented exceptions to Raygun. The RaygunClient requires an HTTP transport (e.g. [Guzzle](http://docs.guzzlephp.org/) or other [PSR-7](https://www.php-fig.org/psr/psr-7/) compatible interface).

There are Guzzle-based asynchronous and synchronous transport classes in the provider, or you can use your own.

### Asynchronous transport

This is an example of basic usage for asynchronous sending of errors and exceptions:

```php
<?php
namespace {
    require_once 'vendor/autoload.php';

    use GuzzleHttp\Client;
{'fraction_non_alphanumeric': 0.11519795657726692, 'fraction_numerical': 0.012515964240102172, 'mean_word_length': 4.484593837535014, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1386127', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1167, 'n_words': 417}