Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on composer update #359

Closed
danielschweiger opened this issue Apr 3, 2024 · 2 comments
Closed

Error on composer update #359

danielschweiger opened this issue Apr 3, 2024 · 2 comments

Comments

@danielschweiger
Copy link

Get this error after update (composer update) to latest version (3.2.4).
Current FIlament Version = 3.2.62.

Symfony\Component\ErrorHandler\Error\FatalError

  Declaration of BezhanSalleh\FilamentShield\Traits\HasPageShield::canAccess(): bool must be compatible with Filament\Resources\Pages\Page::canAccess(array $parameters = []): bool

  at vendor/bezhansalleh/filament-shield/src/Traits/HasPageShield.php:75
     71▕     {
     72▕         return static::canView() && parent::shouldRegisterNavigation();
     73▕     }
     74▕ 
  ➜  75▕     public static function canAccess(): bool
     76▕     {
     77▕         return static::canView();
     78▕     }
     79▕ }
@gvds
Copy link

gvds commented Apr 5, 2024

Updating vendor/bezhansalleh/filament-shield/src/Traits/HasPageShield.php canAccess() signature to:
public static function canAccess(array $parameters = []): bool
fixes the problem.

@valpuia valpuia mentioned this issue Apr 6, 2024
@bezhanSalleh
Copy link
Owner

the method signature might have changed and then changed back cause right now in the entire filament repo i cannot find the canAccess() method to accept params.

@bezhanSalleh bezhanSalleh closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants