Skip to content

Commit cc62bd1

Browse files
committed
Laravel 6 compatibility
1 parent e4ea034 commit cc62bd1

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.0",
20-
"illuminate/support": "^5.0",
20+
"illuminate/support": "^5.0 || ^6.0",
2121
"rollbar/rollbar": "^1"
2222
},
2323
"require-dev": {

src/RollbarServiceProvider.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?php namespace Rollbar\Laravel;
22

3+
use Rollbar\Rollbar;
4+
use Rollbar\RollbarLogger;
5+
use Illuminate\Support\Arr;
36
use InvalidArgumentException;
7+
use Rollbar\Laravel\MonologHandler;
48
use Illuminate\Support\Facades\Config;
59
use Illuminate\Support\ServiceProvider;
6-
use Rollbar\Laravel\MonologHandler;
7-
use Rollbar\RollbarLogger;
8-
use Rollbar\Rollbar;
910

1011
class RollbarServiceProvider extends ServiceProvider
1112
{
@@ -37,9 +38,9 @@ public function register()
3738
throw new InvalidArgumentException('Rollbar access token not configured');
3839
}
3940

40-
$handleException = (bool) array_pull($config, 'handle_exception');
41-
$handleError = (bool) array_pull($config, 'handle_error');
42-
$handleFatal = (bool) array_pull($config, 'handle_fatal');
41+
$handleException = (bool) Arr::pull($config, 'handle_exception');
42+
$handleError = (bool) Arr::pull($config, 'handle_error');
43+
$handleFatal = (bool) Arr::pull($config, 'handle_fatal');
4344

4445
Rollbar::init($config, $handleException, $handleError, $handleFatal);
4546

tests/RollbarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class RollbarTest extends \Orchestra\Testbench\TestCase
1212
{
13-
public function setUp()
13+
protected function setUp(): void
1414
{
1515
$this->access_token = 'B42nHP04s06ov18Dv8X7VI4nVUs6w04X';
1616
putenv('ROLLBAR_TOKEN=' . $this->access_token);

0 commit comments

Comments
 (0)