summaryrefslogtreecommitdiff
path: root/src/Http
diff options
context:
space:
mode:
Diffstat (limited to 'src/Http')
-rw-r--r--src/Http/RequestServiceProvider.php4
-rw-r--r--src/Http/ResponseServiceProvider.php3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/Http/RequestServiceProvider.php b/src/Http/RequestServiceProvider.php
index bbf2579c..37f8c604 100644
--- a/src/Http/RequestServiceProvider.php
+++ b/src/Http/RequestServiceProvider.php
@@ -3,6 +3,7 @@
namespace Engelsystem\Http;
use Engelsystem\Container\ServiceProvider;
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
class RequestServiceProvider extends ServiceProvider
{
@@ -18,6 +19,9 @@ class RequestServiceProvider extends ServiceProvider
/** @var Request $request */
$request = $this->app->call([Request::class, 'createFromGlobals']);
$this->setTrustedProxies($request, $trustedProxies);
+
+ $this->app->instance(Request::class, $request);
+ $this->app->instance(SymfonyRequest::class, $request);
$this->app->instance('request', $request);
}
diff --git a/src/Http/ResponseServiceProvider.php b/src/Http/ResponseServiceProvider.php
index f0d238ef..c1489f06 100644
--- a/src/Http/ResponseServiceProvider.php
+++ b/src/Http/ResponseServiceProvider.php
@@ -3,12 +3,15 @@
namespace Engelsystem\Http;
use Engelsystem\Container\ServiceProvider;
+use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
class ResponseServiceProvider extends ServiceProvider
{
public function register()
{
$response = $this->app->make(Response::class);
+ $this->app->instance(Response::class, $response);
+ $this->app->instance(SymfonyResponse::class, $response);
$this->app->instance('response', $response);
}
}