PHPackages                             fsevestre/boolean-form-type - 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. [API Development](/categories/api)
4. /
5. fsevestre/boolean-form-type

ActiveLibrary[API Development](/categories/api)

fsevestre/boolean-form-type
===========================

Boolean form type for Symfony REST APIs

v2.1.0(3y ago)9470.3k↓67.4%1MITPHPPHP &gt;=7.2.5CI failing

Since Oct 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fsevestre/BooleanFormType)[ Packagist](https://packagist.org/packages/fsevestre/boolean-form-type)[ Docs](https://github.com/fsevestre/BooleanFormType)[ RSS](/packages/fsevestre-boolean-form-type/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

Boolean form type
=================

[](#boolean-form-type)

Boolean form type for Symfony REST APIs.

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

[](#installation)

The recommended way to install this library is through [Composer](http://getcomposer.org/).

Require the `fsevestre/boolean-form-type` package by running the following command:

```
$ composer require fsevestre/boolean-form-type
```

This will resolve the latest stable version and install all the dependencies.

Otherwise, install the library and setup the autoloader yourself.

Usage
-----

[](#usage)

```
$builder->add('enabled', BooleanType::class);
```

By default, the form type use a data transformer which will transform the value to `true` (`1`, `'1'`, `true` and `'true'`) or `false` (`0`, `'0'`, `false` and `'false'`).

If you want to support more values, you can override the `true_values` and `false_values` form type options:

```
$builder
    ->add('enabled', BooleanType::class,
        array(
            'true_values' => array(1, '1', true, 'true', 'on', 'yes'),
            'false_values' => array(0, '0', false, 'false', 'off', 'no'),
        )
    )
;
```

> **Note:** The form type is not intended to be displayed on a browser: use the built-in `CheckboxType` form type provided by Symfony instead.

Tests
-----

[](#tests)

To setup and run tests follow these steps:

```
$ composer install
$ bin/phpunit
```

Contributing
------------

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.md) file.

License
-------

[](#license)

This library is distributed under the [MIT license](LICENSE).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community8

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

1282d ago

Major Versions

v1.0.0 → v2.0.02020-11-29

PHP version history (2 changes)1.x-devPHP &gt;=5.3.9

v2.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4130750?v=4)[Florent SEVESTRE](/maintainers/fsevestre)[@fsevestre](https://github.com/fsevestre)

---

Top Contributors

[![fsevestre](https://avatars.githubusercontent.com/u/4130750?v=4)](https://github.com/fsevestre "fsevestre (13 commits)")

---

Tags

booleanformrestsymfony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fsevestre-boolean-form-type/health.svg)

```
[![Health](https://phpackages.com/badges/fsevestre-boolean-form-type/health.svg)](https://phpackages.com/packages/fsevestre-boolean-form-type)
```

###  Alternatives

[sylius/sylius

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

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

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[symfony/ux-dropzone

File input dropzones for Symfony Forms

551.8M7](/packages/symfony-ux-dropzone)[ehyiah/ux-quill

Symfony UX Bundle to use Quill JS wysiwyg text editor with full and easy customisation

6492.2k3](/packages/ehyiah-ux-quill)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

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

PHPackages © 2026

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