Skip to content
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

AddProviderToBootstrapFile Error #64

Closed
codetec-info opened this issue Apr 2, 2024 · 4 comments · Fixed by #66
Closed

AddProviderToBootstrapFile Error #64

codetec-info opened this issue Apr 2, 2024 · 4 comments · Fixed by #66
Assignees
Labels
bug Something isn't working

Comments

@codetec-info
Copy link

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
Copy link

bplace commented Apr 4, 2024

Getting the same issue indeed, changed the line to

 ServiceProvider::addProviderToBootstrapFile("{$namespace}\\Providers\\MetaTagsServiceProvider");
 return;

@antonioribeiro
Copy link

+1 here

@butschster butschster added the bug Something isn't working label Apr 6, 2024
@butschster
Copy link
Owner

Hi @bplace,
Could you please create a PR?

@butschster butschster linked a pull request Apr 8, 2024 that will close this issue
@bplace
Copy link

bplace commented Apr 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants