PHPackages                             lturi/symfony-extensions - 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. lturi/symfony-extensions

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

lturi/symfony-extensions
========================

Bundle to increase the functionalities for application developed for symfony flex systems

048CSS

Since Nov 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/LorenzoTuri/SymfonyExtensions)[ Packagist](https://packagist.org/packages/lturi/symfony-extensions)[ RSS](/packages/lturi-symfony-extensions/feed)WikiDiscussions full Synced 6d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Symfony flex (5) Utility package for fast developing
====================================================

[](#symfony-flex-5-utility-package-for-fast-developing)

> composer require lturi/symfony-extensions

Installing it through composer is enough (if the project is developed following common symfony rules) to make it work.

In order to enable the 2 routes (routes collector and translations) e little modifications to project config files may be necessary. Open the config/routes.yaml file and add:

```
lturi_symfony_extensions:\
  resource: lturi_symfony_extensions\
  type: extra

```

Features:

- Utility classes:
    - ApiController (better solution to manage generic ApiController then AbstractController)
    - RestApiController (contains the base function to manage a rest api endpoint)
- Controllers:
    - RoutesController (exposes all routes of the project)
    - TranslationController (exposes translation of the project, only for main translations)
- Exceptions
    - ValidationsErrorsException (exception for multiple errors in the message)
- Services
    - EntityNormalizer (normalizer able to detect if the object refers to an entity, and eventually load it)
    - ApiResponse (better solution to answer to an endpoint with a json response)
    - HttpExceptionService (service used to manage in better ways the exceptions)
    - SerializerService (serializer service configured with common normalizers etc and EntityNormalizer)
- Validators
    - SafeString (validate a string for database XSS injection)

Refer to full doc to get details about the single component

TODO: cacheable response fix

- Since symfony is not completely capable of handling cached response, here is
    a little fix for that. Insert in the index.php file something like

```
if ('prod' === $kernel->getEnvironment()) {
    $kernel = new CachedKernel($kernel);
}

```

and automatically each response returned of the types CachableResponse or CachableApiResponse will be cached.

completion of parts:

- commandApi: completed
- graphQLApi: 66%
- jsonApi: 66% to be rafactored, is now broken
- restApi: 0
- rest: to be refactored into restApi/framework and then removed
- package.json/composer.json: TO CHECK FOR DEPENDENCIES

User management:

> composer require symfony/security-bundle

```
# config/packages/security.yaml
security:
    enable_authenticator_manager: true

    providers:
        # this name is casual, class and property should match to this snippet
        app_user_provider:
            entity:
                class: Lturi\SymfonyExtensions\Framework\Entity\User
                property: username
    encoders:
      Lturi\SymfonyExtensions\Framework\Entity\User:
        # insert whatever algoritm you want
        algorithm: sha512
```

Command api example
-------------------

[](#command-api-example)

Data for create/update goes into "data", while criterias into "filters"

```
php bin/console command-api:create site --content '{\"data\": {\"name\": \"test api create\", \"baseUrl\":\"test\", \"siteUrls\":[{\"url\":\"testSiteUrl\"}]}}'
```

Results:

```
{"id":"01F1X6WA7ZMF9CZP73C1EANMWA","baseUrl":"test","dateCreate":"2021-03-28T22:02:22+02:00","dateUpdate":null,"lastCheckDate":null,"checking":false,"siteUrls":[{"id":"01F1X6WA84RTRHG7M0JRJYM19M","url":"testSiteUrl","site":"000000000debbbe70000000003d488a4","siteUrlChecks":[],"siteUrlSummaries":[]}]}
```

contraints:
===========

[](#contraints)

if related entity, add on the property this annotation

```
Symfony\Component\Validator\Constraints\Valid

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![LorenzoTuri](https://avatars.githubusercontent.com/u/9315506?v=4)](https://github.com/LorenzoTuri "LorenzoTuri (48 commits)")

---

Tags

json-apirestsymfony

### Embed Badge

![Health badge](/badges/lturi-symfony-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/lturi-symfony-extensions/health.svg)](https://phpackages.com/packages/lturi-symfony-extensions)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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