Skip to content

Commit 9a0de3c

Browse files
committed
Added Laravel 5.6 compatibility
1 parent f464b72 commit 9a0de3c

File tree

5 files changed

+19
-52
lines changed

5 files changed

+19
-52
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Provide a simple method of managing ACL in a Laravel application built on the
1717
for Laravel.
1818

1919
## Requirements
20-
- PHP >=7.0.0
21-
- Laravel 5.4
20+
- PHP >=7.1.3
21+
- Laravel >= 5.4
2222
- Bootstrap 3 (needs to be included in your layout file)
2323
- FontAwesome 4 (needs to be included in your layout file)
2424

@@ -38,7 +38,7 @@ composer require genealabs/laravel-governor
3838
```php
3939
'providers' => [
4040
// [...]
41-
GeneaLabs\LaravelGovernor\Providers\LaravelGovernorService::class,
41+
GeneaLabs\LaravelGovernor\Providers\Service::class,
4242
// [...]
4343
],
4444
```

composer.json

+11-16
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,19 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=7.0.0",
12+
"php": ">=7.1.3",
1313
"genealabs/laravel-casts": "*",
14-
"illuminate/support": "5.*"
14+
"illuminate/support": "5.5 - 5.6"
1515
},
1616
"require-dev": {
17-
"doctrine/dbal": "^2.5",
18-
"fzaninotto/faker": "~1.4",
19-
"jakub-onderka/php-parallel-lint": "0.9.*",
20-
"laravel/laravel": "5.4.*",
21-
"mockery/mockery": "0.9.*",
22-
"pdepend/pdepend": "^2.2",
23-
"phploc/phploc": "^3.0",
24-
"phpmd/phpmd": "^2.4",
25-
"phpunit/phpunit": "~5.0",
26-
"sebastian/phpcpd": "^2.0",
27-
"squizlabs/php_codesniffer": "^2.7",
28-
"symfony/css-selector": "3.2.*",
29-
"symfony/dom-crawler": "3.2.*"
17+
"codedungeon/phpunit-result-printer": "*",
18+
"doctrine/dbal": "^2.5",
19+
"fzaninotto/faker": "~1.4",
20+
"laravel/laravel": "5.6.*",
21+
"mockery/mockery": "~1.0",
22+
"nunomaduro/collision": "~1.1",
23+
"phpunit/phpunit": "*",
24+
"symfony/thanks": "^1.0"
3025
},
3126
"autoload": {
3227
"classmap": [
@@ -41,7 +36,7 @@
4136
"extra": {
4237
"laravel": {
4338
"providers": [
44-
"GeneaLabs\\LaravelGovernor\\Providers\\LaravelGovernorService"
39+
"GeneaLabs\\LaravelGovernor\\Providers\\Service"
4540
]
4641
}
4742
},

phpunit.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
2+
<phpunit
3+
backupGlobals="false"
34
backupStaticAttributes="false"
5+
bootstrap="vendor/autoload.php"
46
colors="true"
57
convertErrorsToExceptions="true"
68
convertNoticesToExceptions="true"
79
convertWarningsToExceptions="true"
10+
printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer"
811
processIsolation="false"
912
stopOnFailure="false"
1013
syntaxCheck="true"
11-
bootstrap="vendor/autoload.php"
1214
>
1315
<testsuites>
1416
<testsuite name="Governor for Laravel Test Suite">

src/Providers/LaravelGovernorService.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace GeneaLabs\LaravelGovernor\Providers;
22

33
use GeneaLabs\LaravelGovernor\Console\Commands\Publish;
4-
use GeneaLabs\LaravelCasts\Providers\LaravelCastsService;
4+
use GeneaLabs\LaravelCasts\Providers\Service as LaravelCastsService;
55
use GeneaLabs\LaravelGovernor\Listeners\CreatedListener;
66
use GeneaLabs\LaravelGovernor\Listeners\CreatingListener;
77
use GeneaLabs\LaravelGovernor\Http\ViewComposers\Layout;

tests/TestCase.php

-30
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,4 @@ protected function setUp()
2525
]);
2626
$this->withoutExceptionHandling();
2727
}
28-
29-
protected function withoutExceptionHandling()
30-
{
31-
$this->oldExceptionHandler = $this->app->make(ExceptionHandler::class);
32-
$this->app->instance(ExceptionHandler::class, new class extends Handler {
33-
public function __construct()
34-
{
35-
//
36-
}
37-
38-
public function report(Exception $exception)
39-
{
40-
//
41-
}
42-
43-
public function render($request, Exception $exception)
44-
{
45-
throw $exception;
46-
}
47-
});
48-
49-
return $this;
50-
}
51-
52-
protected function withExceptionHandling()
53-
{
54-
$this->app->instance(ExceptionHandler::class, $this->oldExceptionHandler);
55-
56-
return $this;
57-
}
5828
}

0 commit comments

Comments
 (0)