PHPackages                             it-bens/api-platform-utilites-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. it-bens/api-platform-utilites-bundle

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

it-bens/api-platform-utilites-bundle
====================================

v0.1.1(4y ago)011[1 issues](https://github.com/it-bens/api-platform-utilities-bundle/issues)MITPHPPHP ^8.0

Since Sep 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/it-bens/api-platform-utilities-bundle)[ Packagist](https://packagist.org/packages/it-bens/api-platform-utilites-bundle)[ RSS](/packages/it-bens-api-platform-utilites-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

The API Platform Utilities Bundle
=================================

[](#the-api-platform-utilities-bundle)

[![Maintenance Status](https://camo.githubusercontent.com/5ca62441414bacaa54c6c6e5b68e46c76305947b6bf498c4949fc71c1b4b10dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e737667)](https://camo.githubusercontent.com/5ca62441414bacaa54c6c6e5b68e46c76305947b6bf498c4949fc71c1b4b10dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e737667)[![Build Status](https://camo.githubusercontent.com/08b7ea8f59ab88bec662232f5e4be309082a51e459ab911d2b0b371d93495bc1/68747470733a2f2f6170702e7472617669732d63692e636f6d2f69742d62656e732f6170692d706c6174666f726d2d7574696c69746965732d62756e646c652e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/it-bens/api-platform-utilities-bundle)[![Coverage Status](https://camo.githubusercontent.com/e7f81b8a640533b2e6f7e8c37a4919cb33634da12a77a8ca1e08958823816908/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f69742d62656e732f6170692d706c6174666f726d2d7574696c69746965732d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/it-bens/api-platform-utilities-bundle?branch=master)

This bundle provides a set of useful abstract classes that encapsulate some logic for the usage of [API platform](https://api-platform.com). Furthermore, it implements an easily configurable input- and output transformer system that can be used without further classes.

How to install the bundle?
--------------------------

[](#how-to-install-the-bundle)

The bundle can be installed via Composer:

```
composer require it-bens/api-platform-utilites-bundle
```

If you're using Symfony Flex, the bundle will be automatically enabled. For older apps, enable it in your Kernel class.

> ⚠ The ITB\\ObjectTransformerBundle should be enabled, too.

What does this bundle provide and how to use it?
------------------------------------------------

[](#what-does-this-bundle-provide-and-how-to-use-it)

Let's start with the non-configurable stuff.

### DataProvider

[](#dataprovider)

### DataPersister

[](#datapersister)

### DataTransformer

[](#datatransformer)

Now we'll take a look at the `DataTransformer` system, that this bundle provides (or extends).

The typical use-case for the API Platform data transformer system is to transform DTOs to Entities/Objects and vice versa. This bundle uses the `TransformationMediator` from the [Object Transformer Bundle](https://github.com/it-bens/object-transformer-bundle).

Normally, you would probably write an implementation of the API Platform `DataTransformerInterface`for every DTO transformation that should be performed during the ordinary data flow, described [here](https://api-platform.com/docs/core/dto). That's quite a mess if there are a lot of resources, requests DTOs and response DTOs. The `ApiInputTransformer` and `ApiOutputTransformer` classes handle that complete process with a tiny bit of configuration.

After the bundle is enabled, a `itb_api_platform_utilities.yaml` file should be created. Every transformation the two transformers should handle, has to be registered here. Here's an example:

```
itb_api_platform_utilities:
  input_transformations:
    - { request_class: 'ITB\ObjectTransformerTestUtilities\Object1', object_class: 'ITB\ObjectTransformerTestUtilities\Object2' }
  output_transformations:
    - { object_class: 'ITB\ObjectTransformerTestUtilities\Object2', response_class: 'ITB\ObjectTransformerTestUtilities\Object1' }
```

Every line represents a registered transformation. The configuration is allowed to be empty, which means that the transformers of this bundle won't be used. Otherwise, all the keys you see are required and the have to present fully qualified class names.

> ⚠ The transformers will use the `TransformationMediator` as described. That means there should be transformers, that can handle the registered transformations.

That's all you have to configure or implement.

What else?
----------

[](#what-else)

For the configuration and usage of Object Transformer bundle see:

-
-

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

[](#contributing)

I am really happy that the software developer community loves Open Source, like I do! ♥

That's why I appreciate every issue that is opened (preferably constructive) and every pull request that provides other or even better code to this package.

You are all breathtaking!

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

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

Every ~12 days

Total

2

Last Release

1679d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/94aa1cc7aa38ca9d3f6bb96541ff813027df1f0cf478b3c53c41385876503b2c?d=identicon)[SpiGAndromeda](/maintainers/SpiGAndromeda)

---

Top Contributors

[![SpiGAndromeda](https://avatars.githubusercontent.com/u/15141351?v=4)](https://github.com/SpiGAndromeda "SpiGAndromeda (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/it-bens-api-platform-utilites-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

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

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

Bundle that provides controllers and services for using Sulu as headless content management system

55133.7k2](/packages/sulu-headless-bundle)

PHPackages © 2026

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