From b3f58cac47baf3d7f5da1d16f2d9db8139de5fbe Mon Sep 17 00:00:00 2001 From: Vico Dambeck Date: Thu, 1 Sep 2016 12:03:26 +0200 Subject: [PATCH] change request factory example code --- components/http_foundation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 7c4caf8e68e..6729ba4ff61 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -293,6 +293,7 @@ methods or changing some default behavior might help. In that case, register a PHP callable that is able to create an instance of your ``Request`` class:: use Symfony\Component\HttpFoundation\Request; + use AppBundle\Classes\SpecialRequest; Request::setFactory(function ( array $query = array(), @@ -303,7 +304,7 @@ PHP callable that is able to create an instance of your ``Request`` class:: array $server = array(), $content = null ) { - return SpecialRequest::create( + return new SpecialRequest( $query, $request, $attributes,