# New in Symfony 8.2: Forms That Read Your Types

DevFeed: [New in Symfony 8.2: Forms That Read Your Types](<https://devfeed.tech/articles/new-in-symfony-8-2-forms-that-read-your-types-121165.md>)

Original publisher: [Read original article](<https://symfony.com/blog/new-in-symfony-8-2-forms-that-read-your-types>)

Author: Javier Eguiluz

Published: 2026-11-06T08:24:00Z

Content type: release

Language: en

Sources: [Symfony](<https://devfeed.tech/sources/symfony-blog.md>)

Topics: [Symfony](<https://devfeed.tech/topics/symfony.md>), [Forms](<https://devfeed.tech/topics/forms.md>), [Data validation](<https://devfeed.tech/topics/data-validation.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>)

Tags: [closure](<https://devfeed.tech/tags/closure.md>), [component](<https://devfeed.tech/tags/component.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [exception](<https://devfeed.tech/tags/exception.md>), [forms](<https://devfeed.tech/tags/forms.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [null](<https://devfeed.tech/tags/null.md>), [php](<https://devfeed.tech/tags/php.md>), [properties](<https://devfeed.tech/tags/properties.md>), [readonly](<https://devfeed.tech/tags/readonly.md>), [symfony](<https://devfeed.tech/tags/symfony.md>), [types](<https://devfeed.tech/tags/types.md>)

## AI overview

Symfony 8.2 can infer form field types and empty values from PHP property or setter types, reducing repeated configuration for DTOs and attribute-based forms. For example, nullable `int`, `float`, `bool`, and date properties map to corresponding field types; nullable fields remain optional. Empty values for non-nullable `string` and `int` properties become `''` and `0`, while nullable properties keep the prior `null` behavior. `0` still passes `NotBlank`, so numeric fields that must reject emptiness should be nullable. These option guesses apply only when the field type is also inferred; explicitly typed fields still need `empty_data` configured. Forms can now construct readonly DTOs with required constructor arguments and promoted properties, and can edit them by creating a replacement object when readonly fields change. Retrieve updated data with `getData()`. This requires the constructor to promote all class properties; changing readonly fields on other classes, such as entities with private state, still throws.

## Source excerpt

Symfony forms are often backed by a DTO or another class with typed properties. Those types say a lot about each field, but you have to repeat much of that information when creating your forms. In Symfony 8.2, the Form component uses those types, so forms...