Skip to content

Commit

Permalink
Merge pull request #445 from KDederichs/sf7_1.x
Browse files Browse the repository at this point in the history
feat: Support Symfony 7
  • Loading branch information
dbu authored Dec 6, 2023
2 parents 1b16d97 + 91789a4 commit b49bf25
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.2"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.3"
symfony-deprecations-helper: "weak"

# Test with httplug 2.x clients
- dependencies: "php-http/guzzle7-adapter php-http/curl-client:^2.0.0 php-http/vcr-plugin:^1.0@dev php-http/socket-client:^2.0"
Expand All @@ -68,6 +71,10 @@ jobs:
symfony-require: "5.4.*"
php-version: "7.3"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^6.0"
symfony-require: "6.4.*"
php-version: "8.1"
symfony-deprecations-helper: "weak"

steps:
- name: "Checkout"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee

# Version 1

- Added support for Symfony 7

# 1.31.0 - 2023-11-06

- Added configuration for the `header` authentication plugin (#437).
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"php-http/message-factory": "^1.0.2",
"php-http/stopwatch-plugin": "^1.2",
"psr/http-message": "^1.0 || ^2.0",
"symfony/config": "^4.4 || ^5.0 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0"
"symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0"
},
"conflict": {
"php-http/guzzle6-adapter": "<1.1",
Expand All @@ -48,21 +48,21 @@
},
"require-dev": {
"guzzlehttp/psr7": "^1.7 || ^2.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
"nyholm/nsa": "^1.1",
"nyholm/psr7": "^1.2.1",
"php-http/cache-plugin": "^1.7",
"php-http/mock-client": "^1.2",
"php-http/promise": "^1.0",
"symfony/browser-kit": "^4.4 || ^5.0 || ^6.0",
"symfony/cache": "^4.4 || ^5.0 || ^6.0",
"symfony/dom-crawler": "^4.4 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/http-foundation": "^4.4.19 || ^5.0 || ^6.0",
"symfony/phpunit-bridge": "^5.3",
"symfony/stopwatch": "^4.4 || ^5.0 || ^6.0",
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/web-profiler-bundle": "^4.4.19 || ^5.0 || ^6.0",
"symfony/browser-kit": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/dom-crawler": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/http-foundation": "^4.4.19 || ^5.0 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^6.4.1",
"symfony/stopwatch": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/web-profiler-bundle": "^4.4.19 || ^5.0 || ^6.0 || ^7.0",
"twig/twig": "^1.41 || ^2.10 || ^3.0"
},
"suggest": {
Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/ServiceInstantiationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ protected static function bootKernel(array $options = []): KernelInterface
$dispatcher = static::$kernel->getContainer()->get('event_dispatcher');

$class = (Kernel::MAJOR_VERSION >= 5) ? RequestEvent::class : GetResponseEvent::class;
$event = new $class(static::$kernel, SymfonyRequest::create('/'), HttpKernelInterface::MASTER_REQUEST);
$requestType = (Kernel::MAJOR_VERSION >= 6) ? HttpKernelInterface::MAIN_REQUEST : HttpKernelInterface::MASTER_REQUEST;
$event = new $class(static::$kernel, SymfonyRequest::create('/'), $requestType);

$dispatcher->dispatch($event, KernelEvents::REQUEST);

Expand Down

0 comments on commit b49bf25

Please sign in to comment.