wayofdev/laravel-cycle-orm-adapter
EntityManager, RepositoryInterface, Embedding).unique/exists rules via Unique/Exists validation classes (replaces Eloquent’s query-based rules).assertDatabaseHas) to work with Cycle ORM entities. Factories and seeders are supported via companion packages.DatabaseInterface).cycle and mysql).Schema definitions). Laravel’s migrate command would need to be replaced or extended to support Cycle’s schema format.whereIn chaining; uses fluency methods like select()->where()).hasMany/belongsTo; relationships are defined via entity annotations or repository methods.DB::transaction facade equivalent).assertDatabaseHas) sufficient, or will custom assertions be needed?Unique, Exists) and factories.cycle for domain models, mysql for legacy).EntityManager as a singleton.DB::, Model::) with Cycle ORM equivalents (e.g., EntityManager::getRepository()).Schema definitions.| Laravel Feature | Compatibility | Workaround |
|---|---|---|
| Eloquent Models | ❌ Incompatible | Replace with Cycle ORM Entity classes. |
| Query Builder | ⚠️ Partial (DSL differs) | Use Cycle ORM’s Select/Update builders. |
| Migrations | ❌ Incompatible | Use Cycle ORM’s Schema or write raw SQL. |
| Eloquent Relationships | ❌ Incompatible | Define via RepositoryInterface or entity annotations. |
| Validation Rules | ✅ Supported (Unique, Exists) |
Use WayOfDev\Cycle\Bridge\Laravel\Rules. |
| Testing Traits | ✅ Supported (custom assertions) | Replace InteractsWithDatabase with WayOfDev\Cycle\Testing\Concerns\.... |
| Factories | ✅ Supported (via companion package) | Install wayofdev/laravel-cycle-orm-factories. |
| Caching | ❌ No native support | Use Laravel’s cache with custom entity serialization. |
| Queues | ❌ No native support | Bind Cycle ORM’s DatabaseInterface to queue jobs manually. |
| Events/Observers | ⚠️ Limited | Use Cycle ORM’s EventManager or Laravel’s event system with custom listeners. |
composer require wayofdev/laravel-cycle-orm-adapter cycle/orm spiral/roadrunner
php artisan vendor:publish --provider="WayOfDev\Cycle\Bridge\Laravel\CycleServiceProvider"
Entity classes).config/cycle.php for database connections and repositories.unique/exists rules with Unique/Exists rules.InteractsWithDatabase trait from the adapter.Embedding for nested objects).UserRepository vs. UserService).How can I help you explore Laravel packages today?