Skip to content

Parent call is missing in deprecated FormEvent::setData() for events that do not allow it  #53364

@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

      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