Commit a86e070
authored
fix: update registerRoutes to be compatible with Filament v4.8.0
Filament v4.8.0 introduced "Configurable resources", which updated the Page::registerRoutes() signature to include an optional PageConfiguration parameter:
registerRoutes(Panel $panel, ?PageConfiguration $configuration = null)
ApiTokens::registerRoutes() was not updated to match, causing a PHP fatal error on autoload due to incompatible method signature inheritance.
Added the missing optional `?PageConfiguration $configuration = null` parameter to restore compatibility with Filament v4.8.0+, and passed $configuration through to the internal static::routes() as well.
Fixes:
PHP Fatal error: Declaration of Filament\Jetstream\Pages\ApiTokens::registerRoutes(Filament\Panel $panel): void must be compatible with Filament\Pages\Page::registerRoutes(Filament\Panel $panel, ?Filament\Pages\PageConfiguration $configuration = null): void
Ref: https://github.com/filamentphp/filament/releases/tag/v4.8.0
Ref: filamentphp/filament#192251 parent 4cfb330 commit a86e070
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments