Skip to content

Commit 4bf45b1

Browse files
authored
Merge pull request #25 from arnor01/feature/laravel-11
Support for laravel 11
2 parents d6b7714 + 5a28e7c commit 4bf45b1

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

.github/workflows/run-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest]
1616
php: [8.1, 8.2]
17-
laravel: [8.*, 9.*, 10.*]
17+
laravel: [9.*, 10.*, 11.*]
1818
stability: [prefer-stable]
1919
include:
20-
- laravel: 8.*
21-
testbench: ^6.0
2220
- laravel: 9.*
2321
testbench: ^7.0
2422
- laravel: 10.*
2523
testbench: ^8.0
24+
- laravel: 11.*
25+
testbench: ^9.0
26+
exclude:
27+
- laravel: 11.*
28+
php: 8.1
2629

2730
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2831

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@
1818
"require": {
1919
"php": "^8.1",
2020
"filament/filament": "^3.0",
21-
"illuminate/contracts": "^10.0",
2221
"laravel/horizon": "^5.21",
23-
"laravel/telescope": "^4.16",
22+
"laravel/telescope": "^4.16|^5.0",
2423
"spatie/laravel-package-tools": "^1.9.2"
2524
},
2625
"require-dev": {
2726
"laravel/pint": "^1.13",
28-
"nunomaduro/collision": "^7.0",
29-
"orchestra/testbench": "^8.0",
30-
"pestphp/pest": "^2.24",
31-
"pestphp/pest-plugin-laravel": "^2.2",
32-
"phpunit/phpunit": "^10.0"
27+
"nunomaduro/collision": "^5.11|^6.4|^7.0|^8.0",
28+
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
29+
"pestphp/pest": "^1.4|^2.24",
30+
"pestphp/pest-plugin-laravel": "^1.22|^2.2",
31+
"phpunit/phpunit": "^9.0|^10.0"
3332
},
3433
"autoload": {
3534
"psr-4": {

src/Traits/HasDebuggers.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
trait HasDebuggers
88
{
9-
private function authorized(string $ability): bool
9+
private static function authorized(string $ability): bool
1010
{
1111
if (config('filament-debugger.authorization')) {
1212
return (bool) auth(config('filament.auth.guard'))->user()?->can($ability);
@@ -15,20 +15,20 @@ private function authorized(string $ability): bool
1515
return true;
1616
}
1717

18-
public function telescope(): NavigationItem
18+
public static function telescope(): NavigationItem
1919
{
2020
return NavigationItem::make()
21-
->visible($this->authorized(config('filament-debugger.permissions.telescope')))
21+
->visible(self::authorized(config('filament-debugger.permissions.telescope')))
2222
->group(config('filament-debugger.group'))
2323
->url(url: url()->to(config('filament-debugger.url.telescope')), shouldOpenInNewTab: true)
2424
->icon('heroicon-o-sparkles')
2525
->label('Telescope');
2626
}
2727

28-
public function horizon(): NavigationItem
28+
public static function horizon(): NavigationItem
2929
{
3030
return NavigationItem::make()
31-
->visible($this->authorized(config('filament-debugger.permissions.horizon')))
31+
->visible(self::authorized(config('filament-debugger.permissions.horizon')))
3232
->group(config('filament-debugger.group'))
3333
->icon('heroicon-o-globe-europe-africa')
3434
->url(url: url()->to(config('filament-debugger.url.horizon')), shouldOpenInNewTab: true)

tests/DebuggerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Filament\Navigation\NavigationItem;
34
use Stephenjude\FilamentDebugger\DebuggerPlugin;
45

56
it('can install configurations', function () {
@@ -11,9 +12,9 @@
1112
});
1213

1314
it('can open horizon', function () {
14-
$this->get(DebuggerPlugin::horizon())->assertSuccessful();
15+
expect(DebuggerPlugin::horizon())->toBeInstanceOf(NavigationItem::class);
1516
});
1617

1718
it('can open telescope', function () {
18-
$this->get(DebuggerPlugin::telescope())->assertSuccessful();
19+
expect(DebuggerPlugin::telescope())->toBeInstanceOf(NavigationItem::class);
1920
});

0 commit comments

Comments
 (0)