Skip to content

FormType mapping for array on TextType not longer working #29809

Closed
@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected: 4.2.2, 4.1.10, 3.4.21

Description

Since the last release the following error appears when submitting array data to the TextType:

[structure.stagedData] This value is not valid. ({"{{ value }}":"NULL"})

How to reproduce

$builder->add('structure', TextType::class, ['property_path' => 'structure.stagedData']);

Submit an array as data structure for the TextType.

e.g.:

[
    // ...
    'data' => [
        'some' => 'data',
        'more' => [
              'unstructured' => 'data',
        ],
    ],
]

This did work until the last release.

Possible Solution

Not sure is there another formType which can just be used for mapping the data instead of TextType?

Additional context

The following PR #29307 did add the breaking change.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions