PHPackages                             gupalo/symfony-form-transformers - 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. gupalo/symfony-form-transformers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gupalo/symfony-form-transformers
================================

Symfony Form Transformers

1.4.0(4mo ago)012.7k↓15.6%2MITPHPPHP &gt;=8.4

Since Nov 25Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/gupalo/symfony-form-transformers)[ Packagist](https://packagist.org/packages/gupalo/symfony-form-transformers)[ RSS](/packages/gupalo-symfony-form-transformers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (9)Used By (2)

TsvTransformer
==============

[](#tsvtransformer)

Symfony Forms TsvTransformer

How to Install
--------------

[](#how-to-install)

Install the `gupalo/symfony-form-transformers` package using [composer](http://getcomposer.org/):

```
composer require gupalo/symfony-form-transformers
```

Transformers
------------

[](#transformers)

- `EmptyStringTransformer`: allows user to pass empty fields which should be empty strings instead of null
- `JsonYamlTransformer`: user views and edits field as YAML but it is stored as JSON in DB and is array in PHP
- `StringArrayTransformer`: user can enter several strings each from new line and they will become an array
- `TsvTransformer`: user copy-pastes from spreadsheet and PHP gets array with named keys (multiline and quoting are not supported)

Basic Usage
-----------

[](#basic-usage)

Add transformers to your forms

```
class YourEntity
{
    private ?array $data = [];
}
///
class YourEntityType extends AbstractType
{
    public function __construct(private JsonYamlTransformer $jsonYamlTransformer)
    {
        $this->jsonYamlTransformer = $jsonYamlTransformer;
    }

    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            // ...
            ->add('data', TextareaType::class);

        $builder->get('data')->addModelTransformer($this->jsonYamlTransformer);
    }
```

Advanced Usage
--------------

[](#advanced-usage)

Some transformers have options on construct. Options are public properties, you can change them later.

See `tests` for more examples. Also look at `src` - the logic is quite simple.

If you have multiline input Tsv, set `TsvHelper::$multiline = true;`

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance76

Regular maintenance activity

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

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

Recently: every ~264 days

Total

8

Last Release

129d ago

PHP version history (2 changes)1.0.0PHP &gt;=8.1

1.4.0PHP &gt;=8.4

### Community

Maintainers

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

---

Top Contributors

[![luchaninov](https://avatars.githubusercontent.com/u/3829796?v=4)](https://github.com/luchaninov "luchaninov (8 commits)")

---

Tags

symfonyformtsvdata-transformer

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gupalo-symfony-form-transformers/health.svg)

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

###  Alternatives

[pugx/autocompleter-bundle

Add an autocomplete type to forms

93861.6k3](/packages/pugx-autocompleter-bundle)[beelab/recaptcha2-bundle

Provide Google Recaptcha2 form type

55455.1k1](/packages/beelab-recaptcha2-bundle)[shapecode/hidden-entity-type-bundle

Hidden field for Symfony entities

28428.6k1](/packages/shapecode-hidden-entity-type-bundle)[norberttech/aceeditor-bundle

Bundle that integrate excellent JavaScript ace editor into Symfony Form.

28310.8k](/packages/norberttech-aceeditor-bundle)[ekreative/uuid-extra-bundle

Paramconverter, Normalizer and Form Type for Ramsey Uuid

18168.6k](/packages/ekreative-uuid-extra-bundle)

PHPackages © 2026

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