PHPackages                             alexandrebulete/ddd-apiplatform-bridge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. alexandrebulete/ddd-apiplatform-bridge

ActiveLibrary[API Development](/categories/api)

alexandrebulete/ddd-apiplatform-bridge
======================================

API Platform bridge for DDD Foundation - Pure PHP, no framework dependency

1.0.0(3mo ago)011MITPHPPHP ^8.2

Since Jan 26Pushed 3mo agoCompare

[ Source](https://github.com/AlexandreBulete/ddd-apiplatform-bridge)[ Packagist](https://packagist.org/packages/alexandrebulete/ddd-apiplatform-bridge)[ RSS](/packages/alexandrebulete-ddd-apiplatform-bridge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (1)

DDD API Platform Bridge
=======================

[](#ddd-api-platform-bridge)

API Platform bridge for DDD Foundation. Provides State providers, processors, and pagination utilities.

**Pure PHP** - No framework dependency. Can be used with Symfony or Laravel (future).

Installation
------------

[](#installation)

```
composer require alexandrebulete/ddd-apiplatform-bridge
```

For Symfony integration, also install:

```
composer require alexandrebulete/ddd-apiplatform-bundle
```

Structure
---------

[](#structure)

```
src/
└── State/
    └── Paginator.php

```

Usage
-----

[](#usage)

### Paginator

[](#paginator)

A generic paginator implementing API Platform's `PaginatorInterface`:

```
use AlexandreBulete\DddApiPlatformBridge\State\Paginator;
use AlexandreBulete\DddFoundation\Application\Query\QueryBusInterface;

class GetPostsProvider implements ProviderInterface
{
    public function __construct(
        private QueryBusInterface $queryBus,
    ) {}

    public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
    {
        $repository = $this->queryBus->ask(new GetPostsQuery(
            page: $context['filters']['page'] ?? 1,
            itemsPerPage: $context['filters']['itemsPerPage'] ?? 30,
        ));

        $paginator = $repository->paginator();

        if (null === $paginator) {
            return iterator_to_array($repository);
        }

        return new Paginator(
            items: $paginator,
            currentPage: $paginator->getCurrentPage(),
            itemsPerPage: $paginator->getItemsPerPage(),
            lastPage: $paginator->getLastPage(),
            totalItems: $paginator->getTotalItems(),
        );
    }
}
```

Usage with API Platform Resources
---------------------------------

[](#usage-with-api-platform-resources)

```
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\GetCollection;

#[ApiResource(
    operations: [
        new GetCollection(
            provider: GetPostsProvider::class,
        ),
    ],
)]
class PostResource
{
    public function __construct(
        public string $id,
        public string $title,
        public string $content,
    ) {}
}
```

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance87

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15733a17c9dd08fc7def3be016f324453d4f0de828438858d13f63e7c3388353?d=identicon)[Alexandre Buleté](/maintainers/Alexandre%20Bulet%C3%A9)

---

Top Contributors

[![AlexandreBulete](https://avatars.githubusercontent.com/u/40428152?v=4)](https://github.com/AlexandreBulete "AlexandreBulete (1 commits)")

### Embed Badge

![Health badge](/badges/alexandrebulete-ddd-apiplatform-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/alexandrebulete-ddd-apiplatform-bridge/health.svg)](https://phpackages.com/packages/alexandrebulete-ddd-apiplatform-bridge)
```

###  Alternatives

[indragunawan/api-rate-limit-bundle

Rate limits protection for api-platform resources.

68112.4k](/packages/indragunawan-api-rate-limit-bundle)[components-web-app/api-components-bundle

Creates a flexible API for a website's structure, reusable components and common functionality.

322.8k](/packages/components-web-app-api-components-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
