-
Notifications
You must be signed in to change notification settings - Fork 39
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 when using with Telescope on a dev-only env #39
Comments
Did you put in in your require-dev section? |
@barryvdh Yes, same with Laravel Horizon which it's config doesn't seem to complain about missing classes. The only "workaround" to get it not to complain was to remove the published config for the toolbar, but that's not necessarily ideal. |
It's a bit hacky, but I was able to workaround this issue, without deleting the published config by adding the following to the top of my <?php
use Laravel\Telescope\EntryType;
// Add this conditional before the existing return statement
if (! class_exists(EntryType::class)) {
return [];
}
return [
// ...
]; |
Thx @AndrewFeeney |
@barryvdh Can we expect an official fix for this? I can put in a PR for one.. |
I've installed Telescope and set it up to only register and be used on the dev environment, no problems there.
The issue is when I install this Toolbar and publish the config, when running
composer install
on a non-dev env, it throws a Facade error.Digging into things, the cause is the config references Horizon classes
Laravel\Telescope\EntryType
in thecollectors
array in the toolbar config file that's published.Any ideas on a way around this for a local only environment?
I am only loading Telescope and Toolbar packages on the local environment in
AppServiceProvider.php@register
Error
The text was updated successfully, but these errors were encountered: