PHPackages                             agencearcange/symfony-form-tree - 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. agencearcange/symfony-form-tree

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

agencearcange/symfony-form-tree
===============================

create select field with indentation for tree structure

v2.0.1(4y ago)028MITPHPPHP &gt;=7.4

Since Aug 21Pushed 4y agoCompare

[ Source](https://github.com/agencearcange/symfony-form-tree)[ Packagist](https://packagist.org/packages/agencearcange/symfony-form-tree)[ RSS](/packages/agencearcange-symfony-form-tree/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (9)Versions (11)Used By (0)

Symfony Form Tree extension
===========================

[](#symfony-form-tree-extension)

[![CI](https://github.com/agencearcange/symfony-form-tree/actions/workflows/main.yaml/badge.svg)](https://github.com/agencearcange/symfony-form-tree/actions/workflows/main.yaml)

[![Latest Stable Version](https://camo.githubusercontent.com/a880c52ea4d3ab11cbbcf15c348ec1c10bcde1e07a1bb91e8b9ac3bfa603776e/687474703a2f2f706f7365722e707567782e6f72672f6167656e6365617263616e67652f73796d666f6e792d666f726d2d747265652f76)](https://packagist.org/packages/agencearcange/symfony-form-tree) [![Total Downloads](https://camo.githubusercontent.com/6dfa2f213323d675d76ce462baa795f3819cb58fcb422d4c7e9efd69fc22fbb7/687474703a2f2f706f7365722e707567782e6f72672f6167656e6365617263616e67652f73796d666f6e792d666f726d2d747265652f646f776e6c6f616473)](https://packagist.org/packages/agencearcange/symfony-form-tree) [![Latest Unstable Version](https://camo.githubusercontent.com/cb56cebbb5ec80a09290d2a1a8aaf614219cd75e0f80a1e61cb60133d5b1396f/687474703a2f2f706f7365722e707567782e6f72672f6167656e6365617263616e67652f73796d666f6e792d666f726d2d747265652f762f756e737461626c65)](https://packagist.org/packages/agencearcange/symfony-form-tree) [![License](https://camo.githubusercontent.com/cc72f84c2024b2f3490c5fd66bffc34b0db322c53f16cf69cab1bb63b8f96ecb/687474703a2f2f706f7365722e707567782e6f72672f6167656e6365617263616e67652f73796d666f6e792d666f726d2d747265652f6c6963656e7365)](https://packagist.org/packages/agencearcange/symfony-form-tree) [![PHP Version Require](https://camo.githubusercontent.com/9064f4e462986b4e63b6c23f8f8b062a1a171f387072af7887678020a3f84eb3/687474703a2f2f706f7365722e707567782e6f72672f6167656e6365617263616e67652f73796d666f6e792d666f726d2d747265652f726571756972652f706870)](https://packagist.org/packages/agencearcange/symfony-form-tree)

This is a fork from abandoned repo:

This extension provide displaying doctrine tree entity types in symfony forms. It add a prefix to option names in select list that indicates tree level.

[![](doc/example.png)](doc/example.png)

```

    Motors
    Electronics
    -Cell phones
    --Samsung
    -Computers
    Fasion

```

Instalation
-----------

[](#instalation)

1. With composer.json

    ```
    composer require agencearcange/symfony-form-tree

    ```
2. Add type guesser in your services file (**optional**):

    ```

    ```

    or if you use `yml` format:

    ```
    services:
        symfony.form.type_guesser.tree:
            class: Yavin\Symfony\Form\Type\TreeTypeGuesser
            arguments: [ "@doctrine" ]
            tags:
                - { name: form.type_guesser }
    ```
3. Then add field to tree model. In this example

    ```
    use Yavin\Symfony\Form\Type\TreeType;

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('category'); //extension will guess field type

        //or this is full example with default options:

        $builder->add('category', TreeType::class, [
            'class' => Category::class, // tree class
            'levelPrefix' => '-',
            'orderFields' => ['treeLeft' => 'asc'],
            'prefixAttributeName' => 'data-level-prefix',
            'treeLevelField' => 'treeLevel',
        ]);
    }
    ```

    This extension assume that in tree model You have `treeLeft` and `treeLevel` fields. It can be changed in field options.

    [Here](tests/Fixtures/Category.php) is example tree entity.

Other
-----

[](#other)

- [Custom, callback provided prefix](doc/custom_prefix.md)
- [Set default options to all tree select fields](doc/default_options.md)

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% 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 ~288 days

Recently: every ~439 days

Total

10

Last Release

1744d ago

Major Versions

v0.3 → v1.0.02016-01-17

v0.4 → v1.0.12016-12-04

v1.0.3 → v2.0.02021-09-24

PHP version history (2 changes)v1.0.0PHP &gt;=5.5.9

v2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3777fb08c562f93bca49f0cd565049f9273d2b2165c94cc464fe001bd6507111?d=identicon)[Antiseptikk](/maintainers/Antiseptikk)

---

Top Contributors

[![Yavin](https://avatars.githubusercontent.com/u/1175856?v=4)](https://github.com/Yavin "Yavin (13 commits)")[![antiseptikk](https://avatars.githubusercontent.com/u/1520152?v=4)](https://github.com/antiseptikk "antiseptikk (5 commits)")[![LouTerrailloune](https://avatars.githubusercontent.com/u/863742?v=4)](https://github.com/LouTerrailloune "LouTerrailloune (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/agencearcange-symfony-form-tree/health.svg)

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

###  Alternatives

[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[sylius/sylius

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

8.5k5.9M737](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

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

PHPackages © 2026

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