Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In ProviderRepository.php line 208: Class 'Sentry\SentryLaravel\SentryLaravelServiceProvider' not found

I'm trying to install Sentry Error Tracking into my Laravel 5 Project. It throws an Error when i try publishing the Provider using the command

php artisan vendor:publish --provider="Sentry\SentryLaravel\SentryLaravelServiceProvider"

I added this into config/app.php

'providers' => array(
    // ...
    Sentry\SentryLaravel\SentryLaravelServiceProvider::class,
)

'aliases' => array(
    // ...
    'Sentry' => Sentry\SentryLaravel\SentryFacade::class,
)

Then i ran

php artisan vendor:publish --provider="Sentry\SentryLaravel\SentryLaravelServiceProvider"

And it threw the Error

In ProviderRepository.php line 208:
Class 'Sentry\SentryLaravel\SentryLaravelServiceProvider' not found

I've been searching for various solutions but none of them worked for me. This is very important for my project. Can i please please get some assistance. Thank You.

like image 795
Vester Avatar asked Nov 19 '25 14:11

Vester


1 Answers

I recommend official sentry documentation. https://sentry.io/for/laravel/

Not sure what is your exact development environment.(OS, PHP version, laravel version etc).

Here are something you can check.

  1. check your installed sentry laravel package. If you did not install it, use next command to install.
composer require sentry/sentry-laravel
  1. check version of sentry/sentry-laravel from composer.json. Please notice after version 1.x namespace has been changed to
'providers' => array(
    Sentry\Laravel\ServiceProvider::class,
)

'aliases' => array(
    'Sentry' => Sentry\Laravel\Facade::class,
)

Namespace update

version 0.x

Sentry\SentryLaravel\SentryLaravelServiceProvider::class

https://github.com/getsentry/sentry-laravel/blob/0.10.1/src/Sentry/SentryLaravel/SentryLaravelServiceProvider.php

version 1.x

Sentry\Laravel\ServiceProvider::class

https://github.com/getsentry/sentry-laravel/blob/1.0.0/src/Sentry/Laravel/ServiceProvider.php
like image 103
John Avatar answered Nov 21 '25 09:11

John



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!