PHPackages                             victor-codigo/symfony-form-extended - 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. victor-codigo/symfony-form-extended

ActiveLibrary

victor-codigo/symfony-form-extended
===================================

Classes to extend symfony form functionality

v1.1.6(6mo ago)057MITPHP

Since Feb 17Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Victor-codigo/SymfonyFormExtended)[ Packagist](https://packagist.org/packages/victor-codigo/symfony-form-extended)[ RSS](/packages/victor-codigo-symfony-form-extended/feed)WikiDiscussions main Synced 1mo ago

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

Symfony form extended
=====================

[](#symfony-form-extended)

Classes to extend Symfony form functionality.
Adds:

- Form messages translation
- Add flash bag messages
- Uploaded files handler

Prerequisites
-------------

[](#prerequisites)

- PHP 8.1
- Symfony 6.4
- Doctrine\\Common\\Collections\\Collection

Stack
-----

[](#stack)

- [PHP 8.1](https://www.php.net/)
- [Symfony 6.4](https://symfony.com/)
- [PHPUnit 11.5](https://phpunit.de/index.html)
- [PHPStan](https://phpstan.org)
- [Composer](https://getcomposer.org/)

Usage
-----

[](#usage)

1. Install

    ```
    composer require victor-codigo/symfony-form-extended

    ```
2. Classes

    - FormFactoryExtended: Its a wrapper for class FormFactoryInterface. Allows to build class FormExtended.
    - FormFactoryExtendedInterface: It is an interface for class FormFactoryExtended.
    - FormExtended: It is a wrapper that extends Form Symfony functionality.
    - FormExtendedInterface: It is an interface for FormExtended class.
    - FormTypeBase: Extends Symfony AbstractType class functionality.
    - FormTypeExtendedInterface: An interface for FormTypeBase

#### FormFactoryExtended methods:

[](#formfactoryextended-methods)

Adds following methods to interface **Symfony\\Component\\Form\\FormFactoryInterface**.

MethodDescriptionParamsReturn**\_\_construct**creates the builder1. Symfony\\Component\\Form\\FormFactoryInterface: Symfony form to use
2. Symfony\\Contracts\\Translation\\TranslatorInterface: Symfony translation bundle
3. VictorCodigo\\UploadFile\\Adapter\\UploadFileService: Upload File bundle
4. Symfony\\Component\\HttpFoundation\\RequestStack: RequestVictorCodigo\\SymfonyFormExtended\\Factory**createNamedExtended**creates a VictorCodigo\\SymfonyFormExtended\\FormFormExtended1. string: Form name
2. string: Full qualified name form type class
3. string: Translation locale
4. mixed: Form initial data
5. array&lt;string, mixed&gt;: optionsVictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedInterface#### FormExtended methods:

[](#formextended-methods)

Adds following methods to interface **Symfony\\Component\\Form\\FormInterface**.

MethodDescriptionParamsReturn**\_\_construct**Creates the form1. Symfony\\Component\\Form\\FormInterface: Symfony form to use
2. VictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedConstraints: Class to manage form constraints
3. VictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedFields: Class to manage form fields
4. VictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedCsrfToken: Class to manage form CSRF token
5. VictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedUpload: Class to manage form file uploads
6. VictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedMessages: Class to manage form messages
7. string: locale codeVictorCodigo\\SymfonyFormExtended\\Form\\FormExtended**getMessageErrorsTranslated**Gets form message errors translated1. bool: Whether to include errors of child forms as well
2. bool: Whether to flatten the list of errors in case $deep is set to trueDoctrine\\Common\\Collections\\Collection&lt;int, FormMessage&gt;**getMessagesSuccessTranslated**Gets form messages, when form validation is successfulDoctrine\\Common\\Collections\\Collection&lt;int, FormMessage&gt;**getFlashMessagesData**Gets a type of form messages and clears flash from the stack1. string: Messages typeDoctrine\\Common\\Collections\\Collection&lt;int, FormMessage&gt;**getFlashMessages**Gets a type of form messages and clears flash from the stack1. string: Messages typeDoctrine\\Common\\Collections\\Collection&lt;int, string&gt;**addFlashMessagesTranslated**Adds flash messages to Symfony session flash bag1. string: Key for success messages
2. string: Key for error messages
3. bool: Whether to include errors of child forms as wellvoid**getConstraints**Gets form constraints as objectobject**getCsrfToken**Gets form CSRF tokenstring**getFormFields**Gets form fields with the form name. Ej: form\_name\[field\_name\]. If field ends in "\[\]", is considered as field array1. array&lt;int, \\BackedEnum&gt;: Enum that contains form fields namesobject**getFormFieldsValues**Gets form fields with the field value.1. array&lt;int, \\BackedEnum&gt;: Enum that contains form fields names
2. object: Form data validation classobject**getFormTemplateData**Gets general info of the form, ready to use in a template1. array&lt;int, \\BackedEnum&gt;: Enum that contains form fields namesVictorCodigo\\SymfonyFormExtended\\Form\\FormTemplateData**uploadFiles**Sets up form configuration for files uploaded, and move files to a specific path1. Symfony\\Component\\HttpFoundation\\Request: Symfony request
2. string: Upload path where files are moved and saved
3. array&lt;int, string&gt;: File names to be removed in the path in the upload pathVictorCodigo\\SymfonyFormExtended\\Form\\FormExtendedExample
-------

[](#example)

```
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use VictorCodigo\SymfonyFormExtended\Factory\FormFactoryExtendedInterface;

class Controller extends AbstractController
{
    public function __construct(
        private FormFactoryExtendedInterface $formFactoryExtended,
    ) {
    }

    public function __invoke(Request $request): Response
    {
        $form = $this->formFactoryExtended->createNamedExtended('form_name', FormType::class, 'en');

        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $form->uploadFiles($request, '/path/to/upload/files');
        }

        $errorsTranslated = $form->getMessageErrorsTranslated(true);
        $messageSuccess = $form->getMessagesSuccessTranslated();
        $form->addFlashMessagesTranslated('messages_success', 'messages_error', true);
    }
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance66

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Every ~20 days

Recently: every ~1 days

Total

13

Last Release

200d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72442680ed2aa145f8ecb5f5a8433a52cb33f324b3b1b1dcbec3051f8ea8f84a?d=identicon)[Victor-codigo](/maintainers/Victor-codigo)

---

Top Contributors

[![Victor-codigo](https://avatars.githubusercontent.com/u/60933176?v=4)](https://github.com/Victor-codigo "Victor-codigo (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/victor-codigo-symfony-form-extended/health.svg)

```
[![Health](https://phpackages.com/badges/victor-codigo-symfony-form-extended/health.svg)](https://phpackages.com/packages/victor-codigo-symfony-form-extended)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[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)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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