Skip to content

Commit

Permalink
Update to symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
arnedesmedt committed Dec 11, 2023
1 parent 28b78d0 commit 9881173
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
"type": "symfony-bundle",
"require": {
"php": "^7.4 || ^8.0",
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
"ramsey/uuid": "^3.9 || ^4.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/monolog-bundle": "^3.7",
"twig/twig": "^2.7 || ^3.0",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.0",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.0",
"symfony/css-selector": "^4.4 || ^5.4 || ^6.0",
"symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0",
"symfony/yaml": "^4.4 || ^5.4 || ^6.0",
"symfony/templating": "^4.4 || ^5.4 || ^6.0",
"symfony/monolog-bridge": "^4.4 || ^5.4 || ^6.0"
"symfony/twig-bundle": "^5.4 || ^6.0 || ^7.0",
"symfony/browser-kit": "^5.4 || ^6.0 || ^7.0",
"symfony/css-selector": "^5.4 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0",
"symfony/yaml": "^5.4 || ^6.0 || ^7.0",
"symfony/templating": "^5.4 || ^6.0 || ^7.0",
"symfony/monolog-bridge": "^5.4 || ^6.0 || ^7.0"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 6 additions & 7 deletions test/unit/EventListener/RequestIdListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Chrisguitarguy\RequestId\RequestIdGenerator;
use Chrisguitarguy\RequestId\RequestIdStorage;
use Chrisguitarguy\RequestId\UnitTestCase;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -56,7 +55,7 @@ public function testListenerSetsTheRequestIdToStorageWhenFoundInRequestHeaders()
$event = new RequestEvent(
$this->kernel,
$this->request,
HttpKernelInterface::MASTER_REQUEST
HttpKernelInterface::MAIN_REQUEST
);

$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
Expand All @@ -73,7 +72,7 @@ public function testListenerSetsTheIdOnRequestWhenItsFoundInStorage()
$event = new RequestEvent(
$this->kernel,
$this->request,
HttpKernelInterface::MASTER_REQUEST
HttpKernelInterface::MAIN_REQUEST
);

$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
Expand All @@ -95,7 +94,7 @@ public function testListenerGenerateNewIdAndSetsItOnRequestAndStorageWhenNoIdIsF
$event = new RequestEvent(
$this->kernel,
$this->request,
HttpKernelInterface::MASTER_REQUEST
HttpKernelInterface::MAIN_REQUEST
);

$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
Expand Down Expand Up @@ -128,7 +127,7 @@ public function testListenerIgnoresIncomingRequestHeadersWhenTrustRequestIsFalse
$event = new RequestEvent(
$this->kernel,
$this->request,
HttpKernelInterface::MASTER_REQUEST
HttpKernelInterface::MAIN_REQUEST
);

$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
Expand Down Expand Up @@ -164,7 +163,7 @@ public function testRequestWithoutIdInStorageDoesNotSetHeaderOnResponse()
new ResponseEvent(
$this->kernel,
$this->request,
HttpKernelInterface::MASTER_REQUEST,
HttpKernelInterface::MAIN_REQUEST,
$this->response
),
KernelEvents::RESPONSE
Expand All @@ -183,7 +182,7 @@ public function testRequestWithIdInStorageSetsIdOnResponse()
new ResponseEvent(
$this->kernel,
$this->request,
HttpKernelInterface::MASTER_REQUEST,
HttpKernelInterface::MAIN_REQUEST,
$this->response
),
KernelEvents::RESPONSE
Expand Down

0 comments on commit 9881173

Please # to comment.