- Is fusonic/ddd-extensions compatible with Laravel?
- No, fusonic/ddd-extensions is not officially compatible with Laravel. It is explicitly aimed at Symfony and Doctrine ORM, while Laravel is Eloquent-first. Some pure-PHP interfaces and base classes may work, but any Doctrine-coupled code is a hard dependency. Treat it as a reference implementation rather than a drop-in Laravel package.
- How do I install fusonic/ddd-extensions?
- Install it with composer require fusonic/ddd-extensions in a scratch project if you want to inspect the source. For a Laravel application the assessment recommends against adding it as a runtime dependency. Installing it can pull Doctrine and Symfony version constraints that conflict with Laravel's shipped components. Read composer.json and the class inventory before committing.
- Can I use fusonic/ddd-extensions with Eloquent instead of Doctrine?
- Not cleanly. The package's persistence features are built around Doctrine embeddables, custom DBAL types, and Doctrine flush mechanics, which do not map directly to Eloquent. You would need to replace those pieces with Eloquent casts, custom value object casters, and Laravel's transaction hooks. Most teams are better off vendoring only the ORM-agnostic domain classes.
- What DDD building blocks does fusonic/ddd-extensions provide?
- It provides reusable DDD primitives such as entities, value objects, aggregate roots, identities, domain events, and domain exceptions. The goal is to keep domain models explicit and framework-independent in concept. In practice, the package also includes Symfony and Doctrine integration for persistence and event dispatch. That integration is the part that creates friction for Laravel.
- Does fusonic/ddd-extensions support domain events in Laravel?
- Not in a Laravel-native way. The package's event mechanics are tied to Symfony's event dispatcher and likely Doctrine's postFlush hook. Laravel uses its own event dispatcher, model observers, queued listeners, and DB::afterCommit for transactional events. Trying to bridge both will produce two competing event systems, so use Laravel-native patterns or an explicit releaseEvents call at your transaction boundary.
- Is fusonic/ddd-extensions maintained and safe for production?
- The adoption signals are poor: one star, zero dependents, and an opportunity score of 33.37. It appears to be a single-vendor library extracted from a Symfony application, with no published SLA or compatibility promise. Release cadence and issue response are unknown. For production Laravel use, the assessment rates technical risk as high and recommends against a runtime dependency.
- What are alternatives to fusonic/ddd-extensions for Laravel DDD?
- There is no drop-in Laravel equivalent named in the assessment. The preferred alternative is to implement the small DDD primitives in-house, roughly 100 to 300 lines, or vendor the ORM-agnostic parts. If you are committed to Doctrine inside Laravel, laravel-doctrine/orm is the relevant integration route. Otherwise use Laravel-native patterns such as casts, observers, and DB::afterCommit.
- How do I test value objects and entities built with fusonic/ddd-extensions?
- Pure domain classes can be tested with PHPUnit without Laravel or a database. Focus on value object equality and validation, aggregate event recording, identity behavior, and domain exceptions. Doctrine-coupled parts require integration tests against a real database. If you vendor the code into Laravel, keep the domain tests framework-independent and add Laravel tests only at the application boundary.
- Which PHP, Symfony, and Doctrine versions does fusonic/ddd-extensions support?
- The provided context does not state supported PHP, Symfony, or Doctrine version ranges. The assessment explicitly flags version drift as a risk because Doctrine ORM constraints and Symfony component ranges may conflict with Laravel's shipped Symfony versions. Check the package's composer.json and release history before assuming compatibility. There is no published compatibility promise for non-Symfony consumers.
- Should I install fusonic/ddd-extensions or vendor the code into my Laravel app?
- Vendor the code rather than installing it as a runtime dependency. The assessment's verdict is to use fusonic/ddd-extensions as a reference implementation and copy the small, battle-tested, ORM-agnostic domain patterns into your Laravel app. The DDD primitives are worth roughly 100 to 300 lines of in-house code. Installing the package wholesale brings Doctrine coupling, maintenance risk, and event-system mismatch.