Skip to content

Commit 2f212a6

Browse files
committed
Merge branch 'release/1.1.0'
2 parents 70b940b + 4002d46 commit 2f212a6

18 files changed

+181
-4161
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
language: php
22

33
php:
4-
- 7.1
54
- 7.2
65
- 7.3
6+
- 7.4snapshot
77
- nightly
88

99
matrix:
1010
include:
11-
- php: 7.1
12-
env: COMPOSER_FLAGS="--prefer-lowest"
1311
- php: 7.2
1412
env: COMPOSER_FLAGS="--prefer-lowest"
1513
allow_failures:
14+
- php: 7.4snapshot
1615
- php: nightly
1716

1817
before_script:

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
# Changelog
22

3+
## 1.1.0 - 2019-08-16
4+
5+
### Added
6+
7+
- Role Middleware
8+
- Tests for php 7.4
9+
10+
### Changed
11+
12+
- Minimal php version is 7.2
13+
314
## 1.0.1 - 2018-12-11
415

516
### Added
17+
618
- `hasPermission` is an alias of `hasPermissionTo` #2
719

820
### Fixed
921

1022
- Typo in readme #3
11-
- Quoted paprameter in blade directive #4
23+
- Quoted parameter in blade directive #4
1224

1325
## 1.0.0 - 2018-11-28
1426

1527
### Added
16-
- All, init release
28+
29+
- Init release

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,29 @@ You can use several permissions too.
188188
@endanypermission
189189
```
190190

191+
#### Middleware
192+
Add the middleware to your `src/Http/Kernel.php`
193+
```php
194+
use Sourceboat\Middleware\RoleMiddleware;
195+
class Kernel extends HttpKernel
196+
{
197+
...
198+
protected $routeMiddleware = [
199+
...
200+
'role' => RoleMiddleware::class
201+
]
202+
203+
}
204+
```
205+
206+
And use it like
207+
```php
208+
Route::group(['middleware' => ['role:admin']], function () {
209+
//
210+
})
211+
212+
```
213+
191214
## Config
192215

193216
Example Config

composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
}
2020
],
2121
"require": {
22-
"php": ">=7.1"
22+
"php": ">=7.2"
2323
},
2424
"require-dev": {
25-
"orchestra/testbench": "^3.7",
26-
"phpunit/phpunit": "^7.4",
27-
"phpmd/phpmd": "^2.6",
28-
"squizlabs/php_codesniffer": "^3.3",
29-
"consistence/coding-standard": "^3.5"
25+
"orchestra/testbench": "^3.7",
26+
"phpunit/phpunit": "8.3.4",
27+
"phpmd/phpmd": "^2.6",
28+
"squizlabs/php_codesniffer": "^3.3",
29+
"consistence/coding-standard": "^3.8",
30+
"slevomat/coding-standard": "^5.0"
3031
},
3132
"autoload": {
3233
"psr-4": {
@@ -42,7 +43,8 @@
4243
"test": "vendor/bin/phpunit",
4344
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
4445
"lint:phpcs": "vendor/bin/phpcs -s",
45-
"lint:phpmd": "vendor/bin/phpmd config,src,tests text phpmd.xml"
46+
"lint:phpmd": "vendor/bin/phpmd config,src,tests text phpmd.xml",
47+
"fix": "vendor/bin/phpcbf"
4648
},
4749
"config": {
4850
"sort-packages": true

0 commit comments

Comments
 (0)