PHPackages                             mtarld/api-platform-ms-bundle - 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. mtarld/api-platform-ms-bundle

ActiveSymfony-bundle[API Development](/categories/api)

mtarld/api-platform-ms-bundle
=============================

API Platform Microservice Bundle

v1.2.0(1y ago)7124.5k8[3 issues](https://github.com/mtarld/api-platform-ms-bundle/issues)[1 PRs](https://github.com/mtarld/api-platform-ms-bundle/pulls)MITPHPPHP ^8.1CI failing

Since May 10Pushed 1y ago5 watchersCompare

[ Source](https://github.com/mtarld/api-platform-ms-bundle)[ Packagist](https://packagist.org/packages/mtarld/api-platform-ms-bundle)[ RSS](/packages/mtarld-api-platform-ms-bundle/feed)WikiDiscussions 1.x Synced 1w ago

READMEChangelog (7)Dependencies (22)Versions (11)Used By (0)

API Platform Microservice Bundle
================================

[](#api-platform-microservice-bundle)

[![Packagist](https://camo.githubusercontent.com/d079f7c7ee00f636eef77750a71302798534ef3394744cf58e196fd6ccc26451/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d7461726c642f6170692d706c6174666f726d2d6d732d62756e646c652e737667)](https://camo.githubusercontent.com/d079f7c7ee00f636eef77750a71302798534ef3394744cf58e196fd6ccc26451/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d7461726c642f6170692d706c6174666f726d2d6d732d62756e646c652e737667)[![GitHub](https://camo.githubusercontent.com/cbbd06d6e83dc4a490428630cfaca4a83ab1545bd1311e95892486ee743de20f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d7461726c642f6170692d706c6174666f726d2d6d732d62756e646c652e737667)](https://camo.githubusercontent.com/cbbd06d6e83dc4a490428630cfaca4a83ab1545bd1311e95892486ee743de20f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d7461726c642f6170692d706c6174666f726d2d6d732d62756e646c652e737667)[![Actions Status](https://github.com/mtarld/symbok-bundle/workflows/CI/badge.svg)](https://github.com/mtarld/api-platform-ms-bundle/actions)

A Microservice tools bundle for API Platform.

A microservice bundle ?
-----------------------

[](#a-microservice-bundle-)

In a microservice context where each microservices are API Platform instances, each instance must behave as an API Platform data producer and an API Platform data consumer.

But API Platform isn't intended to behave like a client.

Therefore, here comes the API Platform Microservice Bundle!

This bundle intents to provide a set of [tools](#provided-tools)to ease the development of client behaving microservices by trying to abstract the http call layer.

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

You can easily install API Platform Microservice bundle by composer

```
$ composer require mtarld/api-platform-ms-bundle

```

Then, bundle should be registered. Just verify that `config\bundles.php` is containing :

```
Mtarld\ApiPlatformMsBundle\ApiPlatformMsBundle::class => ['all' => true],
```

### Configuration

[](#configuration)

Once the bundle is installed, you should configure it to fit your needs.

To do so, edit `config/packages/api_platform_ms.yaml` and `config/routes/api_platform_ms.yaml`

```
# config/packages/api_platform_ms.yaml

api_platform_ms:
    # HttpClient that will be used internally (default: 'Symfony\Contracts\HttpClient\HttpClientInterface')
    http_client: ~

    # Name of the current microservice (required)
    name: client

    # Option to log request (default '%kernel.debug%')
    log_request: true

    # Host used for microservice dynamic routes generation (default: [])
    hosts:
        - https://client.api

    # List of related microservices
    microservices:
        # Microservice name
        product:
            # Microservice base uri (required)
            base_uri: https://product.api

            # Microservice API path (default: '')
            api_path: /api

            # Microservice format (required)
            # Supported formats: jsonld, jsonhal, jsonapi
            format: jsonld
```

```
# config/routes/api_platform_ms.yaml

api_platform_ms:
    resource: '@ApiPlatformMsBundle/Resources/config/routes.xml'
    prefix: /api
```

And you're ready to go ! 🚀

Provided tools
--------------

[](#provided-tools)

- [**API resource existence constraint**](src/Resources/doc/tools/existence-constraint.md): Help you to ensure that the related resources are existing on the other microservice when doing validation.
- [**Resource collection and pagination**](src/Resources/doc/tools/pagination.md): Handy objects and services to ease paginated collection iteration.
- [**HTTP repository**](src/Resources/doc/tools/http-repository.md): An extendable HTTP repository that you could configure to fetch resources.
- [**HTTP client wrappers**](src/Resources/doc/tools/http-wrapper.md): Clients that adapt HTTP calls according to the targeted microservice configuration.
- [**Authentication header providers**](src/Resources/doc/tools/authentication-header-provider.md): Providers that dynamically inject authentication headers in requests.
- [**ConstraintViolation list denormalizer**](src/Resources/doc/tools/constraint-violation-list.md): Allows you to create a `ConstraintViolationList` instance from a serialized string.
- [**Extension points**](src/Resources/doc/tools/extension-points.md): Events that you can listen to extend the bundle behavior.

Supported microservice formats
------------------------------

[](#supported-microservice-formats)

Currently, API Platform supported formats are:

- jsonld
- jsonapi
- jsonhal

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

After writing your fix/feature, you can run following commands to make sure that everything is still ok.

```
# Install dev dependencies
$ composer install

# Running tests locally
$ make test
```

Authors
-------

[](#authors)

- Mathias Arlaud - [mtarld](https://github.com/mtarld) - &lt;mathias(dot)arlaud@gmail(dot)com&gt;

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance45

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 72.8% 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

Every ~182 days

Recently: every ~303 days

Total

11

Last Release

378d ago

Major Versions

0.x-dev → v1.0.02023-04-05

PHP version history (3 changes)0.1.0PHP ^7.1

v0.3.0PHP ^7.1|^8.0

v1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/74210240f5b6fc7ffbe0638a27676c1d148aa1094b9c5be9a58cb15d0d4355e2?d=identicon)[mtarld](/maintainers/mtarld)

---

Top Contributors

[![mtarld](https://avatars.githubusercontent.com/u/4955509?v=4)](https://github.com/mtarld "mtarld (59 commits)")[![art-cg](https://avatars.githubusercontent.com/u/76955548?v=4)](https://github.com/art-cg "art-cg (7 commits)")[![ismail1432](https://avatars.githubusercontent.com/u/13260307?v=4)](https://github.com/ismail1432 "ismail1432 (4 commits)")[![Chris53897](https://avatars.githubusercontent.com/u/7104259?v=4)](https://github.com/Chris53897 "Chris53897 (4 commits)")[![Rainrider](https://avatars.githubusercontent.com/u/363876?v=4)](https://github.com/Rainrider "Rainrider (4 commits)")[![artemis-mm](https://avatars.githubusercontent.com/u/94542184?v=4)](https://github.com/artemis-mm "artemis-mm (2 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (1 commits)")

---

Tags

api-platformmicroservice-bundlesymfonyapisymfonybundleSymfony BundleMicroserviceapi-plaform

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mtarld-api-platform-ms-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mtarld-api-platform-ms-bundle/health.svg)](https://phpackages.com/packages/mtarld-api-platform-ms-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

63397.4k6](/packages/web-auth-webauthn-symfony-bundle)

PHPackages © 2026

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