update v1.0.6
This commit is contained in:
9
vendor/bugsnag/bugsnag-laravel/CHANGELOG.md
vendored
9
vendor/bugsnag/bugsnag-laravel/CHANGELOG.md
vendored
@@ -1,6 +1,15 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
1.6.3
|
||||
-----
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Avoid initializing Bugsnag when no API key is set
|
||||
| [Dries Vints](https://github.com/driesvints)
|
||||
| [#72](https://github.com/bugsnag/bugsnag-laravel/pull/72)
|
||||
|
||||
1.6.2
|
||||
-----
|
||||
|
||||
|
39
vendor/bugsnag/bugsnag-laravel/README.md
vendored
39
vendor/bugsnag/bugsnag-laravel/README.md
vendored
@@ -2,14 +2,17 @@ Bugsnag Notifier for Laravel and Lumen
|
||||
=====================================
|
||||
|
||||
The Bugsnag Notifier for Laravel gives you instant notification of errors and
|
||||
exceptions in your Laravel PHP applications. We support Laravel 5, Laravel 4, Laravel 3, and Lumen.
|
||||
exceptions in your Laravel PHP applications. We support Laravel 5, Laravel 4,
|
||||
Laravel 3, and Lumen.
|
||||
|
||||
[Bugsnag](https://bugsnag.com) captures errors in real-time from your web,
|
||||
mobile and desktop applications, helping you to understand and resolve them
|
||||
as fast as possible. [Create a free account](https://bugsnag.com) to start
|
||||
capturing errors from your applications.
|
||||
|
||||
Check out this excellent [Laracasts screencast](https://laracasts.com/lessons/better-error-tracking-with-bugsnag) for a quick overview of how to use Bugsnag with your Laravel apps.
|
||||
Check out this excellent [Laracasts
|
||||
screencast](https://laracasts.com/lessons/better-error-tracking-with-bugsnag)
|
||||
for a quick overview of how to use Bugsnag with your Laravel apps.
|
||||
|
||||
Contents
|
||||
--------
|
||||
@@ -99,8 +102,9 @@ Getting Started
|
||||
BUGSNAG_API_KEY=YOUR-API-KEY-HERE
|
||||
```
|
||||
|
||||
1. Optionally, you can add the `notify_release_stages` key to the `config/bugsnag.php` file
|
||||
to define which Laravel environments will send Exceptions to Bugsnag.
|
||||
1. Optionally, you can add the `notify_release_stages` key to the
|
||||
`config/bugsnag.php` file to define which Laravel environments will send
|
||||
Exceptions to Bugsnag.
|
||||
|
||||
```php
|
||||
return array(
|
||||
@@ -175,7 +179,8 @@ For versions of Laravel before 5.0:
|
||||
require __DIR__ . '/../app/Http/routes.php';
|
||||
```
|
||||
|
||||
2. Change the function `report` in `app/Exceptions/Handler.php` to look like this:
|
||||
2. Change the function `report` in `app/Exceptions/Handler.php` to look like
|
||||
this:
|
||||
|
||||
```php
|
||||
public function report(Exception $e) {
|
||||
@@ -249,14 +254,12 @@ $metaData = array(
|
||||
);
|
||||
```
|
||||
|
||||
Additional data can be sent with exceptions as an options hash as detailed in the [Notification Options](docs/Notification Options.md) documentation, including some [options specific to non-fatal exceptions](docs/Notification Options.md#handled-notification-options).
|
||||
|
||||
|
||||
### Configuration Options
|
||||
|
||||
The [Bugsnag PHP Client](https://bugsnag.com/docs/notifiers/php)
|
||||
is available as `Bugsnag`, which allows you to set various
|
||||
configuration options. These options are listed in the [documentation for Bugsnag PHP](https://bugsnag.com/docs/notifiers/php#additional-options).
|
||||
configuration options. These options are listed in the
|
||||
[documentation for Bugsnag PHP](https://bugsnag.com/docs/notifiers/php#additional-options).
|
||||
|
||||
#### Error Reporting Levels
|
||||
|
||||
@@ -295,21 +298,26 @@ function before_bugsnag_notify($error) {
|
||||
}
|
||||
```
|
||||
|
||||
This example snippet adds a "user" tab to the Bugsnag error report. See the [setBeforeNotifyFunction](https://bugsnag.com/docs/notifiers/php#setbeforenotifyfunction)
|
||||
This example snippet adds a "user" tab to the Bugsnag error report. See the
|
||||
[setBeforeNotifyFunction](https://bugsnag.com/docs/notifiers/php#setbeforenotifyfunction)
|
||||
documentation on the `bugsnag-php` library for more information.
|
||||
|
||||
|
||||
Demo Applications
|
||||
-----------------
|
||||
|
||||
The [Bugsnag Laravel source repository](https://github.com/bugsnag/bugsnag-laravel) includes example applications for [Laravel 4, Laravel 5, and Lumen](https://github.com/bugsnag/bugsnag-laravel/tree/master/example).
|
||||
The [Bugsnag Laravel source
|
||||
repository](https://github.com/bugsnag/bugsnag-laravel) includes example
|
||||
applications for [Laravel 4, Laravel 5, and
|
||||
Lumen](https://github.com/bugsnag/bugsnag-laravel/tree/master/example).
|
||||
|
||||
Before running one of the example applications, install the prerequisites:
|
||||
|
||||
brew tap josegonzalez/homebrew-php
|
||||
brew install php56 php56-mcrypt composer
|
||||
|
||||
Then open the example directory (such as `example/laravel-5.1`) in a terminal and start the server:
|
||||
Then open the example directory (such as `example/laravel-5.1`) in a terminal
|
||||
and start the server:
|
||||
|
||||
composer install
|
||||
php56 artisan serve --port 8004
|
||||
@@ -326,7 +334,12 @@ Support
|
||||
Contributing
|
||||
------------
|
||||
|
||||
We'd love you to file issues and send pull requests. The [contributing guidelines](https://github.com/bugsnag/bugsnag-laravel/CONTRIBUTING.md) details the process of building and testing `bugsnag-laravel`, as well as the pull request process. Feel free to comment on [existing issues](https://github.com/bugsnag/bugsnag-laravel/issues) for clarification or starting points.
|
||||
We'd love you to file issues and send pull requests. The [contributing
|
||||
guidelines](https://github.com/bugsnag/bugsnag-laravel/CONTRIBUTING.md) details
|
||||
the process of building and testing `bugsnag-laravel`, as well as the pull
|
||||
request process. Feel free to comment on [existing
|
||||
issues](https://github.com/bugsnag/bugsnag-laravel/issues) for clarification or
|
||||
starting points.
|
||||
|
||||
|
||||
License
|
||||
|
@@ -20,10 +20,8 @@ class BugsnagExceptionHandler extends ExceptionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
$bugsnag = app('bugsnag');
|
||||
|
||||
if ($bugsnag) {
|
||||
$bugsnag->notifyException($e, null, "error");
|
||||
if (app()->bound('bugsnag')) {
|
||||
app('bugsnag')->notifyException($e, null, "error");
|
||||
}
|
||||
|
||||
return parent::report($e);
|
||||
|
@@ -66,7 +66,7 @@ class BugsnagLaravelServiceProvider extends ServiceProvider
|
||||
$client->setReleaseStage($app->environment());
|
||||
$client->setNotifier(array(
|
||||
'name' => 'Bugsnag Laravel',
|
||||
'version' => '1.6.2',
|
||||
'version' => '1.6.3',
|
||||
'url' => 'https://github.com/bugsnag/bugsnag-laravel'
|
||||
));
|
||||
|
||||
|
@@ -42,7 +42,7 @@ class BugsnagLumenServiceProvider extends ServiceProvider
|
||||
$client->setReleaseStage($app->environment());
|
||||
$client->setNotifier(array(
|
||||
'name' => 'Bugsnag Lumen',
|
||||
'version' => '1.6.1',
|
||||
'version' => '1.6.3',
|
||||
'url' => 'https://github.com/bugsnag/bugsnag-laravel'
|
||||
));
|
||||
|
||||
|
1
vendor/bugsnag/bugsnag/.travis.yml
vendored
1
vendor/bugsnag/bugsnag/.travis.yml
vendored
@@ -1,6 +1,7 @@
|
||||
sudo: false
|
||||
language: php
|
||||
php:
|
||||
- 7.0
|
||||
- 5.6
|
||||
- 5.5
|
||||
- 5.4
|
||||
|
9
vendor/bugsnag/bugsnag/CHANGELOG.md
vendored
9
vendor/bugsnag/bugsnag/CHANGELOG.md
vendored
@@ -1,6 +1,15 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
2.6.1 (2016-01-28)
|
||||
-----
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fixes an error thrown when sending an `Error` instance using PHP 7
|
||||
[Petr Bugyík](https://github.com/o5)
|
||||
[#110](https://github.com/bugsnag/bugsnag-php/pull/110)
|
||||
|
||||
2.6.0 (23 Dec 2015)
|
||||
-----
|
||||
|
||||
|
BIN
vendor/bugsnag/bugsnag/build/bugsnag.phar
vendored
BIN
vendor/bugsnag/bugsnag/build/bugsnag.phar
vendored
Binary file not shown.
2
vendor/bugsnag/bugsnag/composer.json
vendored
2
vendor/bugsnag/bugsnag/composer.json
vendored
@@ -16,7 +16,7 @@
|
||||
},
|
||||
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
"phpunit/phpunit": "~4.8|~5.0"
|
||||
},
|
||||
|
||||
"autoload": {
|
||||
|
@@ -18,7 +18,7 @@ class Bugsnag_Configuration
|
||||
public $proxySettings = array();
|
||||
public $notifier = array(
|
||||
'name' => 'Bugsnag PHP (Official)',
|
||||
'version' => '2.6.0',
|
||||
'version' => '2.6.1',
|
||||
'url' => 'https://bugsnag.com',
|
||||
);
|
||||
public $sendEnvironment = false;
|
||||
|
14
vendor/bugsnag/bugsnag/src/Bugsnag/Error.php
vendored
14
vendor/bugsnag/bugsnag/src/Bugsnag/Error.php
vendored
@@ -96,8 +96,20 @@ class Bugsnag_Error
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPHPException(Exception $exception)
|
||||
public function setPHPException($exception)
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
|
||||
if (!$exception instanceof \Throwable) {
|
||||
error_log('Bugsnag Warning: Exception must implement interface \Throwable.');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!$exception instanceof \Exception) {
|
||||
error_log('Bugsnag Warning: Exception must be instance of \Exception.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->setName(get_class($exception))
|
||||
->setMessage($exception->getMessage())
|
||||
->setStacktrace(Bugsnag_Stacktrace::fromBacktrace($this->config, $exception->getTrace(), $exception->getFile(), $exception->getLine()));
|
||||
|
@@ -59,7 +59,7 @@ class Bugsnag_Request
|
||||
|
||||
public static function getCurrentUrl()
|
||||
{
|
||||
$schema = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
|
||||
$schema = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) ? 'https://' : 'http://';
|
||||
|
||||
return $schema.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
||||
}
|
||||
|
@@ -1,5 +1,17 @@
|
||||
<?php
|
||||
|
||||
if (!defined('PHP_VERSION_ID')) {
|
||||
$version = explode('.', PHP_VERSION);
|
||||
|
||||
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 50207) {
|
||||
define('PHP_MAJOR_VERSION', $version[0]);
|
||||
define('PHP_MINOR_VERSION', $version[1]);
|
||||
define('PHP_RELEASE_VERSION', $version[2]);
|
||||
}
|
||||
|
||||
class ClientTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/** @var PHPUnit_Framework_MockObject_MockObject|Bugsnag_Client */
|
||||
@@ -73,11 +85,13 @@ class ClientTest extends PHPUnit_Framework_TestCase
|
||||
->errorHandler(E_NOTICE, "Something broke", "somefile.php", 123);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException PHPUnit_Framework_Error
|
||||
*/
|
||||
public function testSetInvalidCurlOptions()
|
||||
{
|
||||
if (PHP_MAJOR_VERSION >= 7) {
|
||||
$this->setExpectedException('TypeError');
|
||||
} else {
|
||||
$this->setExpectedException('PHPUnit_Framework_Error');
|
||||
}
|
||||
$this->client->setCurlOptions("option");
|
||||
}
|
||||
}
|
||||
|
@@ -128,4 +128,10 @@ class ErrorTest extends Bugsnag_TestCase
|
||||
$errorArray = $this->error->toArray();
|
||||
$this->assertArrayNotHasKey('groupingHash', $errorArray);
|
||||
}
|
||||
|
||||
public function testSetPHPException()
|
||||
{
|
||||
$exception = version_compare(PHP_VERSION, '7.0.0', '>=') ? new \Error() : new Exception();
|
||||
$this->error->setPHPException($exception);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user