Skip to content

Commit 721188b

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: (25 commits) Add missing ID_id validators translation fixed CS Added missing translations in validators.tr.xlf Update validators.es.xlf Update validators.hu.xlf [Validator] Add the missing translations for the Welsh (cy) locale [Validator] Add missing DE validator translations [Validator] Add the missing translations for the Dutch (nl) locale Add missing PL translation Add missing translations. Add missing translations for IT to Validator minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989) [Validator] Add the missing translations for the Arabic (ar) locale add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale [Validator] Add the missing translations for the French (fr) locale [Validator] Add some missing contents to the English translation use PropertyAccessorInterface instead of PropertyAccessor Fix KernelTestCase compatibility for PhpUnit 8 (bis) add xabbuh as code owner of the Form component [Validator] Added a missing translation ...
2 parents 9de22cf + b592b20 commit 721188b

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

Extension/Validator/ViolationMapper/MappingRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getOrigin()
5050
*/
5151
public function match($propertyPath)
5252
{
53-
if ($propertyPath === (string) $this->propertyPath) {
53+
if ($propertyPath === $this->propertyPath) {
5454
return $this->getTarget();
5555
}
5656
}

FormTypeGuesserInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function guessType($class, $property);
3232
* @param string $class The fully qualified class name
3333
* @param string $property The name of the property to guess for
3434
*
35-
* @return Guess\ValueGuess A guess for the field's required setting
35+
* @return Guess\ValueGuess|null A guess for the field's required setting
3636
*/
3737
public function guessRequired($class, $property);
3838

Tests/AbstractRequestHandlerTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,26 @@ public function testSubmitMultipleFiles($method)
285285
$this->assertSame($file, $form->getData());
286286
}
287287

288+
/**
289+
* @dataProvider methodExceptGetProvider
290+
*/
291+
public function testSubmitFileWithNamelessForm($method)
292+
{
293+
$form = $this->createForm('', $method, true);
294+
$fileForm = $this->createBuilder('document', false, ['allow_file_upload' => true])->getForm();
295+
$form->add($fileForm);
296+
$file = $this->getUploadedFile();
297+
$this->setRequestData($method, [
298+
'document' => null,
299+
], [
300+
'document' => $file,
301+
]);
302+
$this->requestHandler->handleRequest($form, $this->request);
303+
304+
$this->assertTrue($form->isSubmitted());
305+
$this->assertSame($file, $fileForm->getData());
306+
}
307+
288308
/**
289309
* @dataProvider getPostMaxSizeFixtures
290310
*/

0 commit comments

Comments
 (0)