PHPackages                             yceruto/decorator-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. [Framework](/categories/framework)
4. /
5. yceruto/decorator-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

yceruto/decorator-bundle
========================

Symfony framework integration of the Decorator library

v1.2.3(1y ago)627MITPHPPHP &gt;=8.2

Since Sep 19Pushed 1y ago2 watchersCompare

[ Source](https://github.com/yceruto/decorator-bundle)[ Packagist](https://packagist.org/packages/yceruto/decorator-bundle)[ RSS](/packages/yceruto-decorator-bundle/feed)WikiDiscussions main Synced 1mo ago

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

DecoratorBundle
===============

[](#decoratorbundle)

[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/67bf76e376a40fe747f589bfd86218a61025e47f1fcbe5922bcf7096b336f7b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7963657275746f2f6465636f7261746f722d62756e646c652f63692e796d6c)](https://camo.githubusercontent.com/67bf76e376a40fe747f589bfd86218a61025e47f1fcbe5922bcf7096b336f7b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7963657275746f2f6465636f7261746f722d62756e646c652f63692e796d6c)[![Version](https://camo.githubusercontent.com/248d7b88909c882c87eb84b0b02b462973cd513fee245362b66f9d7ecd1fefb4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470732533412532462532467265706f2e7061636b61676973742e6f726725324670322532467963657275746f2532466465636f7261746f722d62756e646c652e6a736f6e2671756572793d2532342e7061636b616765732535422532327963657275746f2532466465636f7261746f722d62756e646c65253232253544253542302535442e76657273696f6e266c6162656c3d76657273696f6e)](https://camo.githubusercontent.com/248d7b88909c882c87eb84b0b02b462973cd513fee245362b66f9d7ecd1fefb4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470732533412532462532467265706f2e7061636b61676973742e6f726725324670322532467963657275746f2532466465636f7261746f722d62756e646c652e6a736f6e2671756572793d2532342e7061636b616765732535422532327963657275746f2532466465636f7261746f722d62756e646c65253232253544253542302535442e76657273696f6e266c6162656c3d76657273696f6e)[![PHP](https://camo.githubusercontent.com/14b51a8d340f6d295b69b7ba65857fa4af5646005edd6181891b0bdd7036b408/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470732533412532462532466769746875622e636f6d2532467963657275746f2532466465636f7261746f722d62756e646c652532467261772532466d61696e253246636f6d706f7365722e6a736f6e2671756572793d726571756972652e706870266c6162656c3d706870)](https://camo.githubusercontent.com/14b51a8d340f6d295b69b7ba65857fa4af5646005edd6181891b0bdd7036b408/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470732533412532462532466769746875622e636f6d2532467963657275746f2532466465636f7261746f722d62756e646c652532467261772532466d61696e253246636f6d706f7365722e6a736f6e2671756572793d726571756972652e706870266c6162656c3d706870)[![GitHub License](https://camo.githubusercontent.com/93e3febef52f391b7df6cfa973e9a1a92ce5aac59595d61cdf0c55a30f28c8a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7963657275746f2f6465636f7261746f722d62756e646c65)](https://camo.githubusercontent.com/93e3febef52f391b7df6cfa973e9a1a92ce5aac59595d61cdf0c55a30f28c8a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7963657275746f2f6465636f7261746f722d62756e646c65)

Symfony framework integration of the [`yceruto/decorator`](https://github.com/yceruto/decorator) library.

- Enables decoration capabilities for Symfony controllers and Messenger handlers.

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

[](#installation)

Open a command console, enter your project directory and execute:

```
$ composer require yceruto/decorator-bundle
```

Native Decorators
-----------------

[](#native-decorators)

- Compound

See  `README.md` file for details.

Bundle Decorators
-----------------

[](#bundle-decorators)

### Transactional

[](#transactional)

A Doctrine ORM decorator that wraps persistence method operations within a single Doctrine transaction. In case you're using multiple entity managers, you can pass the name of the entity manager as parameter.

Example:

```
class MyController
{
    #[Transactional(name: 'secondary')]
    public function __invoke(Request $request): Response
    {
        // multiple persistence operations...
    }
}
```

### Serialize

[](#serialize)

A Serializer decorator that encode the result of your controller into a specific format (default: json).

Options:

- `format` the serialization format (default: json)
- `context` the serialization context
- `status` the response status (default: 200)
- `headers` the response headers

Example:

```
class MyController
{
    #[Serialize]
    public function __invoke(): array
    {
        return ['success' => true];
    }
}
```

Supported Features for Using Decorators
---------------------------------------

[](#supported-features-for-using-decorators)

The following features currently support the use of decorators in your application:

- Controllers
- Messenger Handlers (when `symfony/messenger` is installed)

License
-------

[](#license)

This software is published under the [MIT License](LICENSE)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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 ~17 days

Recently: every ~10 days

Total

6

Last Release

517d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebf906be9b4bb0c2060846ce9bbfe246df4e32bb5a8741ce1971ee923db2f8ae?d=identicon)[yceruto](/maintainers/yceruto)

---

Top Contributors

[![yceruto](https://avatars.githubusercontent.com/u/2028198?v=4)](https://github.com/yceruto "yceruto (19 commits)")

---

Tags

wrapperdecorator

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/yceruto-decorator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/yceruto-decorator-bundle/health.svg)](https://phpackages.com/packages/yceruto-decorator-bundle)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

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

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

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[nunomaduro/laravel-desktop-notifier

Send notifications to your desktop from your Laravel commands. An JoliNotif wrapper for Laravel 5.

4781.7M8](/packages/nunomaduro-laravel-desktop-notifier)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/storefront

Storefront for Shopware

684.2M148](/packages/shopware-storefront)

PHPackages © 2026

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