butschster / LaravelMetaTags

The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project
MIT License
540 stars 50 forks source link

AddProviderToBootstrapFile Error #64

Closed codetec-info closed 5 months ago

codetec-info commented 5 months ago

I am using Laravel 10. When I update the package from 3.0.0 to 3.0.2, I got an error:

Whoops\Run::handleError("A void function must not return a value", "butschster\meta-tags\src\Console\InstallCommand.php")

if (file_exists($this->getLaravel()->bootstrapPath('providers.php'))) { // @phpstan-ignore-next-line return ServiceProvider::addProviderToBootstrapFile("{$namespace}\Providers\MetaTagsServiceProvider"); <-- Error here }

bplace commented 5 months ago

Getting the same issue indeed, changed the line to

 ServiceProvider::addProviderToBootstrapFile("{$namespace}\\Providers\\MetaTagsServiceProvider");
 return;
antonioribeiro commented 5 months ago

+1 here

butschster commented 5 months ago

Hi @bplace, Could you please create a PR?

bplace commented 5 months ago

Thank you butschster, I was off for the weekend :]