Skip to content

Commit

Permalink
renamed GetResponseEvent to RequestEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
othillo committed Feb 11, 2020
1 parent 2191d5e commit 72aa841
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Qandidate/Stack/RequestId/MonologProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Qandidate\Stack\RequestId;

use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;

/**
* Processor to add the request id to monolog records.
Expand All @@ -29,7 +29,7 @@ public function __construct($header = 'X-Request-Id')
$this->header = $header;
}

public function onKernelRequest(GetResponseEvent $event)
public function onKernelRequest(RequestEvent $event)
{
$request = $event->getRequest();
$this->requestId = $request->headers->get($this->header, false);
Expand Down
3 changes: 2 additions & 1 deletion test/Qandidate/Stack/RequestId/MonologProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\RequestEvent;

class MonologProcessorTest extends TestCase
{
Expand Down Expand Up @@ -69,7 +70,7 @@ public function it_leaves_the_record_untouched_if_no_request_was_handled()

private function createGetResponseEvent($requestId = false)
{
$getResponseEventMock = $this->createMock('Symfony\Component\HttpKernel\Event\GetResponseEvent');
$getResponseEventMock = $this->createMock(RequestEvent::class);

$request = new Request();

Expand Down

0 comments on commit 72aa841

Please sign in to comment.