8000 Parent call is missing in deprecated FormEvent::setData() for events that do not allow it · Issue #53364 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Parent call is missing in deprecated FormEvent::setData() for events that do not allow it  #53364
Closed
@anyt

Description

@anyt

Symfony version(s) affected

6.4.0

Description

Hi everyone,
As I've spent hours to get into the fact that the method now does literally nothing, while the business logic expects it to update data as it was in 5.4, I think it worth sharing.

Most likely it should trigger a deprecation and call the parent method. Otherwise it's a logical backward compatibility break that is hard to find because it only triggers a deprecation and does nothing.

From my perspective the deprecation is about using an obsolete way to do the thing, while here the method just does nothing and I have no choice except using the new approach to make it work back.

How to reproduce

Subscribe to FormEvents::POST_SUBMIT and call $event->setData($data);

Possible Solution

add parent::setData($data); after deprecation trigger to 6.4 version.

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

      0