8000 [Form] Fix assigning data in PostSetDataEvent and PostSubmitEvent · symfony/symfony@61d71c4 · GitHub
[go: up one dir, main page]

Skip to content
8000

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