PHPackages                             keiwen/cacofony - 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. keiwen/cacofony

ActiveSymfony-bundle

keiwen/cacofony
===============

Custom Application Code Overlay for symfony

6.0.0(1y ago)067PHPPHP &gt;=8.0

Since Jun 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Keiwen/Cacofony)[ Packagist](https://packagist.org/packages/keiwen/cacofony)[ RSS](/packages/keiwen-cacofony/feed)WikiDiscussions master Synced 4w ago

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

Cacofony
========

[](#cacofony)

Custom Application Code Overlay for Symfony framework

**Consolidation completed for Symfony 6.4**

Controller
----------

[](#controller)

- Parent controller 'AppController' is provided
- AppController can automatically dump template parameters on dev: when modifying template, you can see every available parameters
- AppController can automatically retrieve template (in "{controllerName}/{functionName}.html.twig") by using `return renderTemplate([])`
- AppController can redirect with cookies already defined. Methods are added to redirect to referer or to self route.

Controller use a specific Request object (extending standard one), and should be declared in public/index file:

```
//use Symfony\Component\HttpFoundation\Request
use Keiwen\Cacofony\Http\Request

```

Declare its use in kernel if needed

```
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

```

Restrict to Role
----------------

[](#restrict-to-role)

This attribute could be used to check user role. Could be on a single action or for a whole controller.

```
 #[RestrictToRole(roles: "admin")]
class TestController extends DefaultController

```

In this example, system will check if user has 'ROLE\_ADMIN' role. If not, an AccessDeniedException is raised. Value in attribute don't need to be uppercase or have the 'role\_' prefix.

Template Param
--------------

[](#template-param)

This attribute could be used for 'constants' given to templates. It could be defined on a single action, or for the full controller

```
 #[TemplateParameter(name: "section", value: "test")
class TestController extends DefaultController

```

In this example, all actions in this controller will automatically return a 'section' parameter, with value 'test'

Translation
-----------

[](#translation)

For translations purpose, you can set a specific locale (default 'transCode') to display translations code instead of actual translated strings. Useful when working on translations from running application.

Twig
----

[](#twig)

### Filters

[](#filters)

- `label` add ':' at the end of your text. Depending on locale, it can add non-breakable space (as in french)
- `str_limit` to limit displayed string to given length, ending with '...' by default
- `ucfirst` switch first letter to uppercase

### Methods

[](#methods)

- `getRoute()` returns route name
- `hasRole('user')` check if current user has specified role. Value don't need to be uppercase or have the 'role\_' prefix.

EntityRegistry
--------------

[](#entityregistry)

Can save, remove, detach or copy an entity or a list of entities. Each methods include an optional commit parameter (default true). In controller:

```
$this->getEntityRegistry()->saveObject($entity);

```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance42

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

Established project with proven stability

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

Recently: every ~132 days

Total

13

Last Release

506d ago

Major Versions

1.1 → 5.2.02022-10-01

5.4.8 → 6.0.02024-12-19

PHP version history (3 changes)1.0PHP &gt;=7.0

5.2.0PHP &gt;=7.1

6.0.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![Keiwen](https://avatars.githubusercontent.com/u/20301099?v=4)](https://github.com/Keiwen "Keiwen (267 commits)")

### Embed Badge

![Health badge](/badges/keiwen-cacofony/health.svg)

```
[![Health](https://phpackages.com/badges/keiwen-cacofony/health.svg)](https://phpackages.com/packages/keiwen-cacofony)
```

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[rikudou/psr6-dynamo-db-bundle

PSR-6 and PSR-16 cache implementation using AWS DynamoDB for Symfony

2077.8k](/packages/rikudou-psr6-dynamo-db-bundle)[leapt/core-bundle

Symfony LeaptCoreBundle

2529.1k4](/packages/leapt-core-bundle)

PHPackages © 2026

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