<commit_before>Upgrading
=========


## 2.x to 3.x

*Our PHP library has gone through some major improvements, and there are some small changes you'll need to make to get onto the new version.*

#### PHP 5.5.9+

We now require PHP 5.5.9 or higher. If you're using an older version of PHP, you can still use v2. We will containue to maintain v2 along side v3.

#### Namespaces

We are now using namespaces. Simply replace `Bugsnag_` with `Bugsnag\`, and you're good to go.

#### Deprecation

We've removed any deprecated functionality. The main thing to watch out for is the removal of the `setUseSSL` function. You should instead just provide URIs that include the scheme. This change will likely only affect enterprise users.

#### Configuration

We've changed how our configuration system works. You can now build up our config object in a similar way to how you configured the client in v2, and then pass that as the first paramater when you construct the client object. In addition, we've removed some configuration options in faviour of using our new notification pipeline system. Now you can register middleware as well as callbacks to have maximum flxibility. We've also switched to using Guzzle, so you can change the base URI and proxy details by directly interacting with guzzle.<commit_msg>[UPGRADING] Add new error handled behavior<commit_after>Upgrading
=========


## 2.x to 3.x

*Our PHP library has gone through some major improvements, and there are some small changes you'll need to make to get onto the new version.*

#### PHP 5.5.9+

We now require PHP 5.5.9 or higher. If you're using an older version of PHP, you can still use v2. We will containue to maintain v2 along side v3.

#### Namespaces

We are now using namespaces. Simply replace `Bugsnag_` with `Bugsnag\`, and you're good to go.

#### Deprecation

We've removed any deprecated functionality. The main thing to watch out for is the removal of the `setUseSSL` function. You should instead just provide URIs that include the scheme. This change will likely only affect enterprise users.

#### Configuration

We've changed how our configuration system works. You can now build up our config object in a similar way to how you configured the client in v2, and then pass that as the first paramater when you construct the client object. In addition, we've removed some configuration options in faviour of using our new notification pipeline system. Now you can register middleware as well as callbacks to have maximum flxibility. We've also switched to using Guzzle, so you can change the base URI and proxy details by directly interacting with guzzle.

#### Customizing handled errors

We have changed how you attach metadata and update the severity of handled errors in `Bugsnag::notify`. Previously metadata and severity were additional parameters to the `notify` method, now the method takes an optional callable with the Error object, so these properties and more can be changed directly. See the documentation for [reporting handled errors](http://docs.bugsnag.com/platforms/php/other/reporting-handled-errors/) for more information.
{'fraction_non_alphanumeric': 0.058050032071840924, 'fraction_numerical': 0.007697241821680564, 'mean_word_length': 4.462346760070052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1243231', 'n_tokens_mistral': 793, 'n_tokens_neox': 745, 'n_words': 476}