- Can I use alms/database-seeder-bundle in a vanilla Laravel project without Symfony?
- No, this bundle is designed for Symfony and requires Cycle ORM, which conflicts with Laravel’s Eloquent. You’d need to adopt Symfony components (e.g., via Laravel Symfony Bridge) or use Laravel’s native factories instead. The bundle isn’t a drop-in replacement for Laravel’s DatabaseSeeder.
- How do I install this package in a Laravel project?
- Run `composer require alms/database-seeder-bundle`, but note this is primarily for Symfony. In Laravel, you’d need to manually configure Symfony’s DependencyInjection and Console components, which isn’t straightforward. Consider alternatives like Laravel Shift or native factories for Eloquent.
- Does this bundle support Laravel’s migrations or model events?
- No, this bundle is built for Cycle ORM and Symfony’s ecosystem, so it won’t integrate with Laravel’s migrations or model events (e.g., `created`, `saved`). You’d need custom glue code to bridge the two, which adds complexity.
- Will my existing Laravel seeders work with this package?
- No, seeders written for Eloquent won’t work here. This bundle uses Cycle ORM’s syntax, which differs significantly (e.g., no fluent query builder). You’d need to rewrite seeders or maintain a dual setup, which is impractical for most projects.
- Is Cycle ORM required, or can I use Eloquent with this bundle?
- Cycle ORM is a hard dependency—this bundle won’t work with Eloquent. If you’re already using Cycle ORM in your project, this could be useful, but for Eloquent-based apps, it’s a poor fit. Stick to Laravel’s factories or consider a Laravel-native seeder package.
- How does this compare to Laravel’s built-in Factory system?
- This bundle offers advanced features like Laminas Hydrator and custom Faker providers, but Laravel’s factories are simpler and more integrated. Unless you need Symfony’s DI or Cycle ORM’s schema-less queries, Laravel’s native solution is likely sufficient.
- Can I use this bundle in Laravel testing (e.g., DatabaseMigrations or RefreshDatabase)?
- Technically yes, but it complicates testing workflows. You’d need to configure Cycle ORM alongside Eloquent, which could cause conflicts or inconsistent behavior. Laravel’s native testing tools are more seamless for Eloquent-based projects.
- What Laravel versions does this bundle support?
- This bundle doesn’t officially support Laravel—it’s for Symfony (v5.4–7.0). If you’re using Laravel, you’d need to manually bridge Symfony’s dependencies, which may not work across all Laravel versions (8.x–10.x). Always test thoroughly.
- Are there alternatives for Laravel that offer similar seeding features?
- Yes, consider Laravel Shift, Laravel’s native factories, or packages like `laravel-shift/database-seeder`. These are designed for Eloquent and avoid the Symfony/Cycle ORM overhead. For complex data generation, Laravel’s factories + Faker are often enough.
- How active is the maintainer, and is this package stable?
- The last release was in January 2024, and the package has only 1 star on GitHub, suggesting low adoption. Stability is unproven, and the maintainer’s activity isn’t clear. For critical projects, consider more actively maintained alternatives.