Skip to content

Commit 61d71c4

Browse files
committed
[Form] Fix assigning data in PostSetDataEvent and PostSubmitEvent
1 parent aa08fc1 commit 61d71c4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/Form/Event/PostSetDataEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Form\Event;
1313

14-
use Symfony\Component\Form\Exception\BadMethodCallException;
1514
use Symfony\Component\Form\FormEvent;
1615

1716
/**
@@ -29,5 +28,6 @@ public function setData(mixed $data): void
2928
{
3029
trigger_deprecation('symfony/form', '6.4', 'Calling "%s()" will throw an exception as of 7.0, listen to "form.pre_set_data" instead.', __METHOD__);
3130
// throw new BadMethodCallException('Form data cannot be changed during "form.post_set_data", you should use "form.pre_set_data" instead.');
31+
parent::setData($data);
3232
}
3333
}

src/Symfony/Component/Form/Event/PostSubmitEvent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ public function setData(mixed $data): void
2828
{
2929
trigger_deprecation('symfony/form', '6.4', 'Calling "%s()" will throw an exception as of 7.0, listen to "form.pre_submit" or "form.submit" instead.', __METHOD__);
3030
// throw new BadMethodCallException('Form data cannot be changed during "form.post_submit", you should use "form.pre_submit" or "form.submit" instead.');
31+
parent::setData($data);
3132
}
3233
}

0 commit comments

Comments
 (0)
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