Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ddd Apiplatform Bundle

Ddd Apiplatform Bundle Laravel Package

alexandrebulete/ddd-apiplatform-bundle

View on GitHub
Deep Wiki
Context7

Symfony Bundle for DDD API Platform Bridge - Service wiring and configuration

Frequently asked questions about Ddd Apiplatform Bundle
How does this bundle integrate DDD principles with API Platform in a Laravel/Symfony project?
The bundle bridges DDD and API Platform by auto-registering services like the `Paginator` from `ddd-apiplatform-bridge`, allowing you to wrap domain queries (e.g., QueryBus results) in State Providers. This keeps domain logic decoupled while leveraging API Platform’s infrastructure for API responses.
What Laravel/Symfony versions does this bundle support?
This bundle is designed for Symfony 7/8 and API Platform 3.x. While it’s not Laravel-native, it can be used in Laravel projects via Symfony’s integration (e.g., Laravel Symfony Bridge). Always check the underlying `ddd-apiplatform-bridge` version for compatibility.
Do I need to manually configure Dependency Injection (DI) for this bundle?
No, the bundle auto-registers services from `ddd-apiplatform-bridge`, so you only need to enable it in `config/bundles.php`. This reduces boilerplate and integration friction, especially for projects already using Symfony’s DI container.
Can this bundle handle complex DDD patterns like repositories or domain events?
The bundle primarily focuses on pagination and QueryBus integration via State Providers. For advanced DDD patterns like repositories or domain events, you’ll need to extend it manually or rely on existing Symfony/Doctrine tools. It doesn’t natively support event sourcing or CQRS.
What’s the performance impact of using the Paginator service for large datasets?
The `Paginator` wraps domain queries, so performance depends on your underlying QueryBus implementation (e.g., Doctrine, Elasticsearch). There’s minimal overhead, but for large datasets, ensure your domain queries are optimized. Caching (e.g., Symfony Cache, Redis) should be implemented at the domain layer.
Is this bundle suitable for non-DDD projects or simple CRUD APIs?
No, this bundle is tailored for DDD-heavy projects. For simple CRUD APIs, API Platform’s native pagination or Symfony’s `PaginatorComponent` would be lighter and less opinionated. The bundle adds unnecessary complexity for non-DDD use cases.
How do I migrate an existing API Platform project to use this bundle?
Start by enabling the bundle in `bundles.php` and replacing custom pagination logic in State Providers with the `Paginator` service. Test incrementally, focusing on high-effort pagination use cases first. Example: Replace `$queryBus->ask(...)->toArray()` with `new Paginator($queryBus->ask(...))`.
Are there alternatives to this bundle for DDD + API Platform in Symfony/Laravel?
Yes. Consider API Platform’s native pagination (`?page=1&limit=20`), custom State Providers with Symfony’s `PaginatorComponent`, or third-party tools like Laminas API Tools or Neomerx API Platform. These may offer more stability and fewer dependencies than this bundle.
Does this bundle support nested resources or complex filtering/sorting in State Providers?
The bundle provides basic pagination support, but nested resources or advanced filtering/sorting require custom implementation. Undocumented edge cases (e.g., multi-level aggregates) may need manual handling. Always test thoroughly in a non-production environment.
What are the risks of using this bundle given its low adoption and minimal documentation?
The bundle carries risks like abandonware potential, undocumented edge cases, and compatibility issues with future API Platform/Symfony versions. Evaluate alternatives like native API Platform tools or well-documented Symfony DDD bundles (e.g., Laminas CQRS) for lower-risk adoption.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament