PHPackages                             dimkinthepro/http-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. [HTTP &amp; Networking](/categories/http)
4. /
5. dimkinthepro/http-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

dimkinthepro/http-bundle
========================

Request validation bundle for Symfony

1.0.0(1y ago)013MITPHPPHP &gt;=8.2

Since Sep 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dimkinthepro/http-bundle)[ Packagist](https://packagist.org/packages/dimkinthepro/http-bundle)[ Docs](https://github.com/dimkinthepro/http-bundle)[ RSS](/packages/dimkinthepro-http-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Request validation bundle for Symfony
=====================================

[](#request-validation-bundle-for-symfony)

### 1. Installation:

[](#1-installation)

```
composer require dimkinthepro/http-bundle
```

### 2. Check bundles config:

[](#2-check-bundles-config)

```
# config/bundles.php

return [
#...
    Dimkinthepro\Http\DimkintheproHttpBundle::class => ['all' => true],
];
```

### 3. Create bundle configuration:

[](#3-create-bundle-configuration)

```
# config/packages/dimkinthepro_http.yaml

dimkinthepro_http:
    request_validation_enabled: true
    extra_fields_allowed: true
    handle_validation_errors: true
    response_error_format: json
```

### 4. Check validator config:

[](#4-check-validator-config)

```
# config/packages/validator.yaml

framework:
    #...
    validation:
        #...
        mapping:
            paths:
                #...
                - '%kernel.project_dir%/config/validator/'
```

### 5. Create a controller DTO:

[](#5-create-a-controller-dto)

```
# src/App/DTO/RequestDTO.php

namespace App\DTO;

use Dimkinthepro\Http\Domain\DTO\ValidatedDTOInterface;

class RequestDTO implements ValidatedDTOInterface
{
    public string $method;
    public int $parameter;
    public \DateTimeImmutable $date;
    public App\Enum\FooEnum $enum;
}
```

### 6. Create a validation config for DTO:

[](#6-create-a-validation-config-for-dto)

```
# config/validator/RequestDTO.yaml

App\DTO\RequestDTO:
  properties:
    method:
      - NotBlank: ~
    parameter:
      - NotBlank: ~
      - GreaterThan: 0
      - LessThanOrEqual: 255
    date:
      - NotBlank: ~
    enum:
      - NotBlank: ~
```

### 7. Use validated DTO in your controller:

[](#7-use-validated-dto-in-your-controller)

```
# src/App/Controller/Controller.php

namespace App\Controller;

use App\DTO\RequestDTO;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;

class Controller extends AbstractController
{
    public function __invoke(RequestDTO $DTO): JsonResponse
    {
        return new JsonResponse([
            'method' => $DTO->method,
            'parameter' => $DTO->parameter,
            'date' => $DTO->date,
            'enum' => $DTO->enum->value,
        ]);
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

613d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8753e58b7caa98494a6c70f4870cb382ec93566e7839def58e8c050624e398dd?d=identicon)[dimkin.the.pro](/maintainers/dimkin.the.pro)

---

Top Contributors

[![dimkinthepro](https://avatars.githubusercontent.com/u/104203723?v=4)](https://github.com/dimkinthepro "dimkinthepro (1 commits)")

---

Tags

dddphp82request-validationsymfony-bundlehttprequestsymfonybundlevalidation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dimkinthepro-http-bundle/health.svg)

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

###  Alternatives

[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)

PHPackages © 2026

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