I've been following an article by Fabien Potencier about building your own framework from Symfony Components.
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
I thought that the Request object could be used as a replacement for the PHP superglobals. However if I upload a file, and it encounters errors (i.e. empty file upload), it doesn't contain any error information?
Here is the output of the $_FILES array, it contains the error code
Array
(
[inputIndex] => Array
(
[name] => Array
(
[3] =>
)
[type] => Array
(
[3] =>
)
[tmp_name] => Array
(
[3] =>
)
[error] => Array
(
[3] => 4
)
[size] => Array
(
[3] => 0
)
)
)
Here's the output of the $request object
Array
(
[inputIndex] => Array
(
[3] =>
)
)
In the case of $_FILES the request object loses a lot of information. Is it contained anywhere else in the request object? How does Symfony handle this?