PHPackages                             hostnet/form-handler-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. hostnet/form-handler-bundle

ActiveSymfony-bundle

hostnet/form-handler-bundle
===========================

Hostnet form handler to provide an easier way of handling forms in actions

2.0.1(1y ago)71168.1k↓10.3%15[3 issues](https://github.com/hostnet/form-handler-bundle/issues)MITPHPPHP ^8.1CI passing

Since Jun 16Pushed 1y ago15 watchersCompare

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

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

[ ![](https://camo.githubusercontent.com/6a25649d6782916f44c023c179b7d1822b6005755f4309c3f0f2368a0038ef06/68747470733a2f2f7777772e686f73746e65742e6e6c2f696d616765732f686f73746e65742e737667)](http://www.hostnet.nl)

The form handlers are designed to enhance the developer experience (DX) when working with Symfony forms. It makes the controllers simpler by moving the form success and failure flows to a separate class.

```
class YourController extends Controller
{
    public function formAction(Request $request, MyEntityUser $user)
    {
        $handler = $this->get('hostnet.form_handler.factory')->create(MyFormHandler::class);

        if (($response = $handler->handle($request, new MyFormData())) instanceof RedirectResponse) {
            return $response;
        }

        // regular or in-valid flow
        return $this->render->renderView('/your/form.html.twig', [
            'form' => $handler->getForm()->createView()
        ]);
    }
}
```

By extracting the success - and if available, the failure - flows, you reduce the amount of code in your controllers, which in turn, achieves slim controllers. The definition of a controller is according to Symfony: *["a PHP function you create that reads information from the Symfony's Request object and creates and returns a Response object"](http://symfony.com/doc/current/controller.html)*.

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

[](#installation)

- Read the [installation guide](https://github.com/hostnet/form-handler-bundle/wiki/Installation)when using composer.
- This bundle and the component follow [semantic versioning](http://semver.org/) strictly.

Documentation
-------------

[](#documentation)

- Read the [Getting Started guide](https://github.com/hostnet/form-handler-bundle/wiki/Getting-Started-With-Form-Handlers) if you are new to form handlers.
- You can find the full documentation on our [github wiki pages](https://github.com/hostnet/form-handler-bundle/wiki).
- If you are migrating from 1.1 to 1.2 or 2.x, check the [migration guide](https://github.com/hostnet/form-handler-bundle/wiki/Migration-towards-2.x).
- The [legacy documentation for 1.1](https://github.com/hostnet/form-handler-bundle/wiki/Legacy-Readme)is still available but upgrading is recommended.

License
-------

[](#license)

The `hostnet/form-handler-bundle` is licensed under the [MIT License](https://github.com/hostnet/form-handler-bundle/blob/master/LICENSE), meaning you can reuse the code within proprietary software provided that all copies of the licensed software include a copy of the MIT License terms and the copyright notice.

Get in touch
------------

[](#get-in-touch)

- We are available on the [symfony-devs](https://slackinvite.me/to/symfony-devs)slack server in [\#hostnet-form-handlers](https://symfony-devs.slack.com/messages/C3SJH42QP).
- Or via our email: .

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance42

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~327 days

Total

20

Last Release

461d ago

Major Versions

0.1.0 → 1.0.02014-07-15

1.7.4 → 2.0.02024-05-13

PHP version history (7 changes)0.0.1PHP &gt;=5.4

1.1.0PHP ^5.5|^7.0

1.2.0-betaPHP ^5.6|^7.0

1.7.1PHP &gt;=7.2

1.7.2PHP &gt;=7.3

1.7.4PHP ^7.3|^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5468127?v=4)[Yannick de Lange](/maintainers/yannickl88)[@yannickl88](https://github.com/yannickl88)

![](https://www.gravatar.com/avatar/65433e1ef6edb2e8f96e18614b6618c84eed20ad0de6de0d0da36a9032ec7a18?d=identicon)[hostnet](/maintainers/hostnet)

---

Top Contributors

[![yannickl88](https://avatars.githubusercontent.com/u/5468127?v=4)](https://github.com/yannickl88 "yannickl88 (33 commits)")[![linaori](https://avatars.githubusercontent.com/u/1754678?v=4)](https://github.com/linaori "linaori (20 commits)")[![nutama](https://avatars.githubusercontent.com/u/9001392?v=4)](https://github.com/nutama "nutama (6 commits)")[![janlam7](https://avatars.githubusercontent.com/u/5459235?v=4)](https://github.com/janlam7 "janlam7 (6 commits)")[![GwendolenLynch](https://avatars.githubusercontent.com/u/1427081?v=4)](https://github.com/GwendolenLynch "GwendolenLynch (3 commits)")[![nicoschoenmaker](https://avatars.githubusercontent.com/u/1469323?v=4)](https://github.com/nicoschoenmaker "nicoschoenmaker (3 commits)")[![svandervlugt](https://avatars.githubusercontent.com/u/9334451?v=4)](https://github.com/svandervlugt "svandervlugt (3 commits)")[![JasperS2307](https://avatars.githubusercontent.com/u/26083805?v=4)](https://github.com/JasperS2307 "JasperS2307 (2 commits)")[![ping-localhost](https://avatars.githubusercontent.com/u/37925797?v=4)](https://github.com/ping-localhost "ping-localhost (2 commits)")[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (1 commits)")[![StijnKlopper2k](https://avatars.githubusercontent.com/u/198602351?v=4)](https://github.com/StijnKlopper2k "StijnKlopper2k (1 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (1 commits)")[![mvrhov](https://avatars.githubusercontent.com/u/450008?v=4)](https://github.com/mvrhov "mvrhov (1 commits)")[![mvannes](https://avatars.githubusercontent.com/u/8969371?v=4)](https://github.com/mvannes "mvannes (1 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hostnet-form-handler-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/hostnet-form-handler-bundle/health.svg)](https://phpackages.com/packages/hostnet-form-handler-bundle)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[friendsofsymfony/http-cache-bundle

Set path based HTTP cache headers and send invalidation requests to your HTTP cache

43813.2M47](/packages/friendsofsymfony-http-cache-bundle)[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)[contao/core-bundle

Contao Open Source CMS

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

PHPackages © 2026

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