TiagoSilvaPereira / vemto-issues

Repository to track Vemto Issues
30 stars 0 forks source link

Call to undefined method Illuminate\Support\ServiceProvider::defaultProviders() - app.php line 158 #418

Open AdamovicBoban opened 1 year ago

AdamovicBoban commented 1 year ago

https://user-images.githubusercontent.com/68257663/232325534-d43badfd-e28f-4c19-9106-f4c2378b392a.mp4

There is no defaultProviders() function in the ServiceProvider class ?

image

Until yesterday, it generated a regular array of providers and many more lines in the array. It only happens when the Laravel10 version is generated.

This is a screenshot from Laravel9

image

Is this a BUG or a problem on my part?

fredyns commented 1 year ago

i got that error too. hope it will be solved soon.

TiagoSilvaPereira commented 1 year ago

@AdamovicBoban @fredyns it is due to an update to Laravel 10.x. We are already working to adapt Vemto to it, but I think just updating the Laravel version on your composer.json may solve it

TiagoSilvaPereira commented 1 year ago

@fredyns @AdamovicBoban seems the problem is that the latest Laravel updates were not published to Packagist yet (but Vemto always clones the latest Laravel skeleton version). So, it is downloading the Laravel project with the changes, but when composer installs laravel/framework, it doesn't have the changes necessary to work correctly.

For now, please replace the whole config/app.php file with the following content:

https://github.com/laravel/laravel/blob/64685e6f206bed04d7785e90a5e2e59d14966232/config/app.php

And then, try generating the code again.

I believe this problem will be fixed soon once the new version of Laravel 10 is uploaded to Packagist.

In Vemto 2 we will no longer have this type of problem (despite this being the first occurrence in two years), since Vemto 2 will not be responsible for how Laravel is installed, always using the official methods (something that is not yet possible with current Vemto).

Best regards

wandakh commented 10 months ago

@TiagoSilvaPereira

I've tried the code on github, but it raises a new error. The following error is presented:

**In Facade.php line 178:

Facade does not implement getFacadeAccessor method.

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1**

how to solve this error, can you help me?

TiagoSilvaPereira commented 10 months ago

Hi @wandakh what version of Laravel are you trying to generate?