8000 minor #6939 Fixed Request Factory Example (vdambeck) · damienalexandre/symfony-docs@7852306 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7852306

Browse files
committed
minor symfony#6939 Fixed Request Factory Example (vdambeck)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes symfony#6939). Discussion ---------- Fixed Request Factory Example The Request Factory Example dosen't work anymore. I change the example code. So it will work now. Commits ------- c877fce change request factory example code
2 parents 5d2e077 + c877fce commit 7852306

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)
0