I downloaded a laravel project online from link
I ran the command is composer update and composer install.
The error i’m seeing is:
In ProviderRepository.php line 208:
Class "CollectiveHtmlHtmlServiceProvider" not found
Script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 1
After deleting vendor file and running composer install and composer update im getting this
PHP Fatal error: Declaration of AppProvidersEventServiceProvider::boot(IlluminateContractsEventsDispatcher $events) must be compatible with IlluminateFoundationSupportProvidersEventServiceProvider::boot() in C:xampphtdocsZAlertappProvidersEventServiceProvider.php on line 27
In EventServiceProvider.php line 27:Declaration of AppProvidersEventServiceProvider::boot(IlluminateContractsEventsDispatcher $events) must be compatible with IlluminateFoundationSupportProvidersEventServiceProvider::boot()
Script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 255
I was expecting this to run in laravel 9
2
Answers
Add this line to your service provider php file
"
It looks like this library missed in your composer.json or you didn’t run composer install
Please follow the nexts steps:
1 – require the package in "composer.json" :
2 – Run
3 – Add this to config/app.php providers array :
4- And this to the aliases array :
5- optional step
that should resolve your issue , let me know if you need any help