Skip to content

[Form] ChoiceType is still calling the removed PostSubmitEvent::setData() #52829

@ThomasLandauer

Description

@ThomasLandauer

Symfony version(s) affected

7.0.0

Description

@HeahDude in #51043 you removed FormEvent::setData().

But ChoiceType::buildForm() still contains this line at https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php#L162

$event->setData($knownValues);

But this will now lead to a BadMethodCallException in PostSetDataEvent and PostSubmitEvent.

Did you overlook this? Or is this line never executed in fact (and thus could be deleted)?

How to reproduce

See above.

Possible Solution

No response

Additional Context

No response

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy