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.1.0
2026-11-20 12:44 UTC
Requires
- php: ^8.4
- alexandrebulete/ddd-apiplatform-bridge: ^1.1
- symfony/config: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/framework-bundle: ^7.4 || ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^12.0 || ^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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(/* ... */); } }