1 month ago

Cannot declare class. Conflicts between legacy and eloquent factories

Posted 1 month ago by manojow

I created new eloquent factories to my new project that I recently updated to laravel 8. Now when I want to test with phpunit I get this message

Cannot declare class Database\Factories\FooFactory, because the name is already in use in /var/www/atsnacks/database/factories/FooFactory.php on line 9

Is anyone facing the same problem? It is impossible now to mix between legacy and eloquent factories?

Please sign in or create an account to participate in this conversation.