Skip to content

Commit c9e28e4

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: fix lowest deps synchronize RelayProxy [Form] Adding more `@var` PHPDoc's to silence psalm [Validator] added missing Hungarian translation [Validator] add missing lv translation fix the exception being thrown fix syntax error fix redis messenger scheme comparison [Scheduler] Separate id and description in message providers [Form] Adding `@var` PHPDoc to silence psalm append instead of replacing potentially non-existent named-arguments [Validator] added missing Polish translation add translations for the MacAddress constraint remove invalid changelog entry Added missing Serbian (sr_Latn) translations [Cache][DependencyInjection][Lock][Mailer][Messenger][Notifier][Translation] Url decode username and passwords from `parse_url()` results [Security] added missing Albanian translations [Validator] Add missing Hungarian translation [Serializer] Fix using deserialization path [Validator] Add missing hr translation
2 parents e5904cf + 406dbb1 commit c9e28e4

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Extension/Core/Type/ChoiceType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
3131
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
3232
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
33+
use Symfony\Component\Form\Event\PreSubmitEvent;
3334
use Symfony\Component\Form\Exception\TransformationFailedException;
3435
use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper;
3536
use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper;
@@ -98,6 +99,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
9899
// Make sure that scalar, submitted values are converted to arrays
99100
// which can be submitted to the checkboxes/radio buttons
100101
$builder->addEventListener(FormEvents::PRE_SUBMIT, static function (FormEvent $event) use ($choiceList, $options, &$unknownValues) {
102+
/** @var PreSubmitEvent $event */
101103
$form = $event->getForm();
102104
$data = $event->getData();
103105

Extension/Core/Type/FileType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Extension\Core\Type;
1313

1414
use Symfony\Component\Form\AbstractType;
15+
use Symfony\Component\Form\Event\PreSubmitEvent;
1516
use Symfony\Component\Form\FileUploadError;
1617
use Symfony\Component\Form\FormBuilderInterface;
1718
use Symfony\Component\Form\FormEvent;
@@ -45,6 +46,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
4546
{
4647
// Ensure that submitted data is always an uploaded file or an array of some
4748
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) {
49+
/** @var PreSubmitEvent $event */
4850
$form = $event->getForm();
4951
$requestHandler = $form->getConfig()->getRequestHandler();
5052

Extension/Core/Type/TimeType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer;
1919
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;
2020
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
21+
use Symfony\Component\Form\Event\PreSubmitEvent;
2122
use Symfony\Component\Form\FormBuilderInterface;
2223
use Symfony\Component\Form\FormEvent;
2324
use Symfony\Component\Form\FormEvents;
@@ -59,6 +60,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5960

6061
if ('single_text' === $options['widget']) {
6162
$builder->addEventListener(FormEvents::PRE_SUBMIT, static function (FormEvent $e) use ($options) {
63+
/** @var PreSubmitEvent $event */
6264
$data = $e->getData();
6365
if ($data && preg_match('/^(?P<hours>\d{2}):(?P<minutes>\d{2})(?::(?P<seconds>\d{2})(?:\.\d+)?)?$/', $data, $matches)) {
6466
if ($options['with_seconds']) {

0 commit comments

Comments
 (0)