Closed raarevalo96 closed 1 year ago
I will put together a test case for this and look into the issue.
If more information is needed I'll be happy to help!
There is a partial fix checked in.
It is a complete fix for Laravel 9.x and 10.x. It works for Laravel 5.x-8.x on PHP 7.x
It fails for Laravel 6.x-8.x on PHP 8.0 It fails for Laravel 8.x on PHP 8.1 and PHP 8.2
I want to fix the failing versions before doing a release.
In the meanwhile, could you update your composer.json to use "dev-master" as the version and try this out? Let me know if it works for you.
Just updated to "dev-master", I can confirm the fix is working, tests are now working as expected. Thank you for your help and for making this package. I'll be waiting for the release so you can close this issue.
This issue is fixed in release v3.3.3.
What is happening?
When a test using the
Illuminate\Foundation\Testing\RefreshDatabase
trait is being seeded, DatabaseSeeder calls a Seeder that extends SpreadsheetSeeder, throwing the following exception:This contains the following code:
Reading through this library, the file src/Writers/Database/DatabaseWriter.php contains the following line:
Which directly references the exception message.
The test is being run by the
php artisan test
command. Removing the seeder that extends SpreadsheetSeeder fixes the error.Environment