bagisto / laravel-data-faker

Creates fake data of products and customers for testing
MIT License
23 stars 23 forks source link

Upgrade for Laravel 8 and bagisto 1.3.0 #13

Closed akristou closed 2 years ago

akristou commented 3 years ago

Seed command not work with Bagisto 1.3.0 and Laravel 8: php artisan db:seed --class="Webkul\DataFaker\Database\Seeders\DatabaseSeeder"

We have this error: Unable to locate factory for [Webkul\Product\Models\ProductFlat].

AbdElrahmaN31 commented 3 years ago

@ghermans Excuse me, when can you expect to solve this bug?

devansh-webkul commented 3 years ago

Unfortunately, the latest version is on Laravel 8 and currently, this is not compatible. But your problem seems to be here, https://github.com/bagisto/laravel-data-faker/blob/f952fa75ed6990e1bac5233943245c74ed79c631/composer.json#L26

Just try to fix your composer autoload.

AbdElrahmaN31 commented 3 years ago

Unfortunately, the latest version is on Laravel 8 and currently, this is not compatible. But your problem seems to be here, https://github.com/bagisto/laravel-data-faker/blob/f952fa75ed6990e1bac5233943245c74ed79c631/composer.json#L26

Just try to fix your composer autoload.

I checked the factory dir and found it with capital D in Database and updated it, but nothing changed. still reduce the same error

AbdElrahmaN31 commented 3 years ago

@devansh-webkul Excuse me, can you give my any hint, how I can solve this issue?

devansh-webkul commented 3 years ago

May i know what version of composer are you using?

devansh-webkul commented 3 years ago

And one more thing I want to mention. Version 1.3.0 is not on Laravel 8, https://github.com/bagisto/bagisto/blob/87d933648df2d80458df54622b1a6c065b7b7328/composer.json#L37

AbdElrahmaN31 commented 3 years ago

May i know what version of composer are you using?

Thanks for replaying @devansh-webkul . My Composer version is 2.1.5.

AbdElrahmaN31 commented 3 years ago

And one more thing I want to mention. Version 1.3.0 is not on Laravel 8, https://github.com/bagisto/bagisto/blob/87d933648df2d80458df54622b1a6c065b7b7328/composer.json#L37

@devansh-webkul Also my bagisto vesion is 1.3.2

devansh-webkul commented 3 years ago

In that case, this will not work in your instance. I am marking this as an enhancement because this needs to be compatible. In your case, I just only recommend you to wait for this.

AbdElrahmaN31 commented 3 years ago

@devansh-webkul Thanks. Is there any other way to create dummy products?

devansh-webkul commented 3 years ago

Right now there is no way. Unless and until you can create your own script. But I recommend you to wait for this. Because even if you do changes in the vendor this will get overwritten and this is not recommendable.

AbdElrahmaN31 commented 3 years ago

Right now there is no way. Unless and until you can create your own script. But I recommend you to wait for this. Because even if you do changes in the vendor this will get overwritten and this is not recommendable.

@devansh-webkul Thanks a lot for your replaying and helping. when can we guess get this enhancement?

devansh-webkul commented 3 years ago

Hi @AbdElrahmaN31,

I just checked this and currently, it is not met with the Laravel 8 complaints. So I am giving the quick fix for this.

Then, after that, we will improve the core first. Then again back to this one.

devansh-webkul commented 3 years ago

Raised an issue to core for update the laravel factories also, https://github.com/bagisto/bagisto/issues/5165

AbdElrahmaN31 commented 3 years ago

@devansh-webkul , Thanks a lot

ghermans commented 2 years ago

Closing this issue as it will be followed up with #24