Skip to content

Commit c877fce

Browse files
vdambeckxabbuh
authored andcommitted
change request factory example code
1 parent 5d2e077 commit c877fce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/http_foundation.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ methods or changing some default behavior might help. In that case, register a
293293
PHP callable that is able to create an instance of your ``Request`` class::
294294

295295
use Symfony\Component\HttpFoundation\Request;
296+
use AppBundle\Classes\SpecialRequest;
296297

297298
Request::setFactory(function (
298299
array $query = array(),
@@ -303,7 +304,7 @@ PHP callable that is able to create an instance of your ``Request`` class::
303304
array $server = array(),
304305
$content = null
305306
) {
306-
return SpecialRequest::create(
307+
return new SpecialRequest(
307308
$query,
308309
$request,
309310
$attributes,

0 commit comments

Comments
 (0)