I'm receiving an error saying
In ProviderRepository.php line 208:
Class 'Spatie\Permission\PermissionServiceProvider' not found
I have included Spatie\Permission\PermissionServiceProvider::class, in the provider array.
After doing composer update I've started receiving this error
The Class not found message is mostly self explanatory: it can't find the class ... presumably because the composer autoloader doesn't have it indexed ... which usually means it's not installed locally.
You said this happened "after doing composer update". What version of this package did you have before the update? What version does it have now? Did you remove this package from your composer.json file? Do you have a syntax error in your composer.json, that's causing things not to load?
I can't think of anything "specific to this package" that would be causing any of your symptoms. Possible troubleshooting might include running composer update, or composer show or composer outdated.
I've seen one scenario where a cloned package (not the original package) will sometimes get "removed" by composer during a composer update, and simply running composer update again will resolve it. It's rare, but I offer it as a possible troubleshooting step.
Most helpful comment
The
Class not foundmessage is mostly self explanatory: it can't find the class ... presumably because the composerautoloaderdoesn't have it indexed ... which usually means it's not installed locally.You said this happened "after doing composer update". What version of this package did you have before the update? What version does it have now? Did you remove this package from your
composer.jsonfile? Do you have a syntax error in your composer.json, that's causing things not to load?I can't think of anything "specific to this package" that would be causing any of your symptoms. Possible troubleshooting might include running
composer update, orcomposer showorcomposer outdated.I've seen one scenario where a cloned package (not the original package) will sometimes get "removed" by composer during a composer update, and simply running
composer updateagain will resolve it. It's rare, but I offer it as a possible troubleshooting step.