Skip to content

Commit

Permalink
Merge pull request #33 from arnedesmedt/feature/update-to-symfony-7
Browse files Browse the repository at this point in the history
Update to symfony 7
  • Loading branch information
chrisguitarguy authored Jan 19, 2024
2 parents 28b78d0 + fbce076 commit 81ad081
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 36 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,16 @@ jobs:

strategy:
matrix:
include:
# Symfony 6.X does not support PHP 7.4
- php-version: 7.4
symfony-require: "4.4.*"
- php-version: 7.4
symfony-require: "5.4.*"


- php-version: 8.0
symfony-require: "4.4.*"
- php-version: 8.0
symfony-require: "5.4.*"

- php-version: 8.1
symfony-require: "4.4.*"
- php-version: 8.1
symfony-require: "5.4.*"
- php-version: 8.1
symfony-require: "6.*"

php-version:
- '8.2'
- '8.3'
symfony-require:
- '5.4.*'
- '6.*'
- '7.*'
composer-flags:
- ''
- '--prefer-lowest'
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"license": "MIT",
"type": "symfony-bundle",
"require": {
"php": "^7.4 || ^8.0",
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0",
"php": "^8.2",
"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 81ad081

Please # to comment.