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,