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

Cannot add GateCollector on Laravel Debugbar #1636

Open
Naomikho opened this issue Jul 26, 2024 · 1 comment
Open

Cannot add GateCollector on Laravel Debugbar #1636

Naomikho opened this issue Jul 26, 2024 · 1 comment

Comments

@Naomikho
Copy link

Naomikho commented Jul 26, 2024

Exception: Cannot add GateCollector on Laravel Debugbar: Target [Illuminate\Contracts\Auth\Access\Gate] is not instantiable while building [Barruvdh\Debugbar\DataCollector\GateCollector].
vendor/barryvdh/.laravel-debugbar/src/LaravelDebugbar.php#663

I just updated Laravel version to v11.18.0 and updated other packages as well, is there any possible reason for this exception? The exception did not occur before the package updates. I am currently using v3.13.5 for the debug bar. I was also working on another project that is using similar package versions but the error did not occur for some reason

@Naomikho
Copy link
Author

Naomikho commented Aug 12, 2024

I managed to fix the issue by publishing the config file(php artisan vendor:publish and selecting the config file for Laravel Debugbar) for the debugbar and set 'gate' to false, but this solution wouldn't work for people who would need the GateCollector.

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

No branches or pull requests

1 participant