alexandrebulete/ddd-apiplatform-bundle
QueryBus, State Providers) with API Platform, enabling a clean separation of concerns between domain logic and API layer. This aligns well with hexagonal architecture or clean architecture patterns where domain logic is decoupled from infrastructure.State Providers to inject domain-driven pagination (Paginator), reducing boilerplate for DDD-based APIs. Ideal for projects already using Symfony + API Platform + DDD.ddd-apiplatform-bridge without requiring manual DI configuration, reducing integration friction.ProviderInterface, allowing TPMs to reuse existing DDD query logic (e.g., QueryBus) for API responses.Paginator service simplifies offset/limit-based pagination for DDD aggregates, reducing custom implementation effort.ddd-apiplatform-bridge (v1.0), which may lack stability or features (e.g., CQRS, event sourcing hooks).Why Rebuild?
api-platform/core + symfony/ux-live-component)?DDD Depth
Performance
Paginator? Is it optimized for large datasets?Alternatives
?page=1&limit=20).PaginatorComponent + custom State Providers.Migration Path
Laminas CQRS, Symfony Messenger).Doctrine ORM, Elasticsearch).composer require alexandrebulete/ddd-apiplatform-bundle
bundles.php and test basic pagination.Paginator.// Before (custom)
return $this->queryBus->ask(new GetPostsQuery())->toArray();
// After (bundle)
return new Paginator($this->queryBus->ask(new GetPostsQuery()));
composer.json constraints).PaginationContext or ItemNormalizer.Laminas CQRS) configured.bundles.php.Paginator.ddd-apiplatform-bridge (v1.0), which may stagnate.Paginator adds a layer; test with high-traffic endpoints.| Risk | Impact | Mitigation |
|---|---|---|
| Bundle Abandonware | Broken dependencies, no updates | Fork or replace with custom solution. |
| Pagination Bugs | Incorrect data or performance issues | Rollback to native API Platform pagination. |
| DDD-QueryBus Mismatch | State Provider failures | Isolate bundle usage to non-critical endpoints. |
| Symfony/API Platform Upgrade | Compatibility breaks | Test in staging before upgrading. |
QueryBus and State Providers.Paginator usage patterns.Paginator performance.How can I help you explore Laravel packages today?