PHPackages                             letkode/common-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. letkode/common-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

letkode/common-bundle
=====================

Common exceptions, attributes, value resolvers and utilities for Symfony applications

1.0.0(today)001MITPHPPHP ^8.4

Since Jun 19Pushed todayCompare

[ Source](https://github.com/letkode/common-bundle)[ Packagist](https://packagist.org/packages/letkode/common-bundle)[ RSS](/packages/letkode-common-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (10)Versions (2)Used By (1)

letkode/common-bundle
=====================

[](#letkodecommon-bundle)

Common exceptions, attributes, value resolvers and utilities for Symfony applications.

---

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

[](#installation)

```
composer require letkode/common-bundle
```

Symfony Flex will register the bundle automatically. If not using Flex, add it manually:

```
// config/bundles.php
return [
    Letkode\CommonBundle\LetkodeCommonBundle::class => ['all' => true],
];
```

---

Contents
--------

[](#contents)

### Exceptions

[](#exceptions)

All exceptions implement `HttpStatusExceptionInterface` and map directly to an HTTP status code. Throw them from services — the `ExceptionListener` in your project converts them to JSON responses.

ClassHTTP`BadRequestException`400`UnauthorizedException`401`EntityNotFoundException`404`TooManyRequestsException`429`ValueObjectException`422```
throw new EntityNotFoundException('User not found.');
throw new ValueObjectException('Invalid email.', translationKey: 'errors.email_invalid');
```

### Attributes

[](#attributes)

#### `#[UniqueField]` — Constraint

[](#uniquefield--constraint)

Validates that a field value is unique in the database via Doctrine.

```
#[UniqueField(entity: User::class, field: 'email')]
public string $email;
```

#### `#[MapUuid]` — Mapping

[](#mapuuid--mapping)

Marks a constructor parameter or property for automatic UUID deserialization.

### Value Resolver

[](#value-resolver)

#### `UuidValueResolver`

[](#uuidvalueresolver)

Automatically resolves `Uuid` typed route parameters without manual conversion.

```
#[Route('/users/{uuid}')]
public function show(Uuid $uuid): JsonResponse { ... }
```

### Utils

[](#utils)

#### `BuilderUrlClient`

[](#builderurlclient)

Builds absolute URLs using the configured `APP_CLIENT_URL` base. Requires `letkode/helpers-bundle`.

#### `JsonReader`

[](#jsonreader)

Reads and decodes JSON files from the filesystem, throwing on invalid JSON.

---

Requirements
------------

[](#requirements)

- PHP `^8.4`
- Symfony `^7.0 || ^8.0`
- `doctrine/persistence` `^3.0`
- `letkode/helpers-bundle` `^1.0`

---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/562202fef9515226531f2d5c3b8cfc6a0a3a3bb61616204e56e3d93eaec3ed5f?d=identicon)[letkode.app](/maintainers/letkode.app)

---

Top Contributors

[![tjcalma](https://avatars.githubusercontent.com/u/4671171?v=4)](https://github.com/tjcalma "tjcalma (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/letkode-common-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k50.1M314](/packages/api-platform-core)[sylius/sylius

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

8.5k5.8M711](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M462](/packages/pimcore-pimcore)[contao/core-bundle

Contao Open Source CMS

1231.6M2.6k](/packages/contao-core-bundle)

PHPackages © 2026

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