Skip to content

Commit 380ab04

Browse files
Merge branch '3.3' into 3.4
* 3.3: [HttpFoundation] Fix bad merge in NativeSessionStorage Bump phpunit-bridge requirement to 3.4|4.0 [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false) [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler` Add a "link" script to ease debugging Flex apps [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method
2 parents fc83843 + e260ab8 commit 380ab04

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

Extension/HttpFoundation/HttpFoundationRequestHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ public function handleRequest(FormInterface $form, $request = null)
108108
$form->submit($data, 'PATCH' !== $method);
109109
}
110110

111+
/**
112+
* {@inheritdoc}
113+
*/
111114
public function isFileUpload($data)
112115
{
113116
return $data instanceof File;

FormConfigBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
3232
*
3333
* @var NativeRequestHandler
3434
*/
35-
private static $nativeRequestProcessor;
35+
private static $nativeRequestHandler;
3636

3737
/**
3838
* The accepted request methods.
@@ -496,10 +496,10 @@ public function getMethod()
496496
public function getRequestHandler()
497497
{
498498
if (null === $this->requestHandler) {
499-
if (null === self::$nativeRequestProcessor) {
500-
self::$nativeRequestProcessor = new NativeRequestHandler();
499+
if (null === self::$nativeRequestHandler) {
500+
self::$nativeRequestHandler = new NativeRequestHandler();
501501
}
502-
$this->requestHandler = self::$nativeRequestProcessor;
502+
$this->requestHandler = self::$nativeRequestHandler;
503503
}
504504

505505
return $this->requestHandler;

NativeRequestHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ public function handleRequest(FormInterface $form, $request = null)
118118
$form->submit($data, 'PATCH' !== $method);
119119
}
120120

121+
/**
122+
* {@inheritdoc}
123+
*/
121124
public function isFileUpload($data)
122125
{
123126
// POST data will always be strings or arrays of strings. Thus, we can be sure

RequestHandlerInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ interface RequestHandlerInterface
2727
public function handleRequest(FormInterface $form, $request = null);
2828

2929
/**
30-
* @param mixed $data
30+
* Returns true if the given data is a file upload.
31+
*
32+
* @param mixed $data The form field data
3133
*
3234
* @return bool
3335
*/

0 commit comments

Comments
 (0)