alexandrebulete / ddd-apiplatform-bundle
Symfony Bundle for DDD API Platform Bridge - Service wiring and configuration
Package info
github.com/AlexandreBulete/ddd-apiplatform-bundle
Type:symfony-bundle
pkg:composer/alexandrebulete/ddd-apiplatform-bundle
1.0.1
2026-02-05 04:23 UTC
Requires
- php: ^8.2
- alexandrebulete/ddd-apiplatform-bridge: ^1.0
- symfony/config: ^7.0 || ^8.0
- symfony/dependency-injection: ^7.0 || ^8.0
- symfony/framework-bundle: ^7.0 || ^8.0
README
Symfony Bundle for the DDD API Platform Bridge. Provides service wiring and configuration for API Platform integration.
Installation
composer require alexandrebulete/ddd-apiplatform-bundle
Configuration
Add the bundle to your config/bundles.php:
return [ // ... AlexandreBulete\DddApiPlatformBundle\DddApiPlatformBundle::class => ['all' => true], ];
Features
This bundle automatically registers services from ddd-apiplatform-bridge:
Paginatoravailable for use in your State Providers
Usage
Create your own State Providers using the Paginator:
use AlexandreBulete\DddApiPlatformBridge\State\Paginator; use ApiPlatform\Metadata\Operation; use ApiPlatform\State\ProviderInterface; class GetPostsProvider implements ProviderInterface { public function __construct( private QueryBusInterface $queryBus, ) {} public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null { $posts = $this->queryBus->ask(new GetPostsQuery(/* ... */)); // Return Paginator for pagination support return new Paginator(/* ... */); } }